Index: TXM/trunk/org.txm.groovy.ide.rcp/build.properties
===================================================================
--- TXM/trunk/org.txm.groovy.ide.rcp/build.properties	(revision 0)
+++ TXM/trunk/org.txm.groovy.ide.rcp/build.properties	(revision 3606)
@@ -0,0 +1,10 @@
+#Fri Jul 06 10:25:10 CEST 2018
+output..=bin/
+bin.includes = plugin.xml,\
+               META-INF/,\
+               .,\
+               icons/,\
+               contexts.xml,\
+               OSGI-INF/
+source..=src/
+#qualifier=svn

Property changes on: TXM/trunk/org.txm.groovy.ide.rcp/build.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: TXM/trunk/org.txm.groovy.ide.rcp/OSGI-INF/l10n/bundle_fr.properties
===================================================================

Property changes on: TXM/trunk/org.txm.groovy.ide.rcp/OSGI-INF/l10n/bundle_fr.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: TXM/trunk/org.txm.groovy.ide.rcp/OSGI-INF/l10n/bundle.properties
===================================================================
--- TXM/trunk/org.txm.groovy.ide.rcp/OSGI-INF/l10n/bundle.properties	(revision 0)
+++ TXM/trunk/org.txm.groovy.ide.rcp/OSGI-INF/l10n/bundle.properties	(revision 3606)
@@ -0,0 +1,6 @@
+#Properties file for org.txm.groovy.rcp
+Bundle-Name = Rcp
+category.name = Sample Category
+view.name = Sample View
+activity.description = should hide the groovy project button
+activity.name = MenuHidingActivity
\ No newline at end of file

Property changes on: TXM/trunk/org.txm.groovy.ide.rcp/OSGI-INF/l10n/bundle.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: TXM/trunk/org.txm.groovy.ide.rcp/icons/sample.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: TXM/trunk/org.txm.groovy.ide.rcp/icons/sample.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: TXM/trunk/org.txm.groovy.ide.rcp/plugin.xml
===================================================================
--- TXM/trunk/org.txm.groovy.ide.rcp/plugin.xml	(revision 0)
+++ TXM/trunk/org.txm.groovy.ide.rcp/plugin.xml	(revision 3606)
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>  
+
+   <extension
+         point="org.eclipse.ui.views">
+      <category
+            name="%category.name"
+            id="org.txm.groovy.ide.rcp">
+      </category>
+      <view
+            name="%view.name"
+            icon="icons/sample.gif"
+            category="org.txm.groovy.ide.rcp"
+            class="org.txm.groovy.ide.rcp.views.SampleView"
+            id="org.txm.groovy.ide.rcp.views.SampleView">
+      </view>
+   </extension>
+   <extension point="org.eclipse.ui.activities">  
+   <activity
+         description="%activity.description"
+         id="myActivity"
+         name="%activity.name">  
+      <enabledWhen>  
+         <with variable="activePartId">    
+            <equals value="nonExistentPartId"></equals>      
+         </with>
+      </enabledWhen>
+   </activity>
+   <activityPatternBinding
+         activityId="myActivity"
+         isEqualityPattern="true"
+         pattern="opengroovyprojectwizard">  
+   </activityPatternBinding>
+</extension>  
+   <extension
+         point="org.eclipse.ui.perspectiveExtensions">
+      <perspectiveExtension
+            targetID="org.eclipse.jdt.ui.JavaPerspective">
+         <view
+               ratio="0.5"
+               relative="org.eclipse.ui.views.ProblemView"
+               relationship="right"
+               id="org.txm.groovy.ide.rcp.views.SampleView">
+         </view>
+      </perspectiveExtension>
+   </extension>
+   <extension
+         point="org.eclipse.help.contexts">
+      <contexts
+            file="contexts.xml">
+      </contexts>
+   </extension>
+
+</plugin>

Property changes on: TXM/trunk/org.txm.groovy.ide.rcp/plugin.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: TXM/trunk/org.txm.groovy.ide.rcp/.classpath
===================================================================
--- TXM/trunk/org.txm.groovy.ide.rcp/.classpath	(revision 0)
+++ TXM/trunk/org.txm.groovy.ide.rcp/.classpath	(revision 3606)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con"
+		path="org.eclipse.jdt.launching.JRE_CONTAINER" />
+	<classpathentry kind="con"
+		path="org.eclipse.pde.core.requiredPlugins" />
+	<classpathentry kind="src" path="src" />
+	<classpathentry kind="output" path="bin" />
+</classpath>
\ No newline at end of file

Property changes on: TXM/trunk/org.txm.groovy.ide.rcp/.classpath
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: TXM/trunk/org.txm.groovy.ide.rcp/META-INF/MANIFEST.MF
===================================================================
--- TXM/trunk/org.txm.groovy.ide.rcp/META-INF/MANIFEST.MF	(revision 0)
+++ TXM/trunk/org.txm.groovy.ide.rcp/META-INF/MANIFEST.MF	(revision 3606)
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-SymbolicName: org.txm.groovy.ide.rcp;singleton:=true
+Export-Package: org.txm.groovy.ide.rcp,
+ org.txm.groovy.ide.rcp.views
+Bundle-Version: 1.0.0.qualifier
+Bundle-Name: %Bundle-Name
+Require-Bundle: org.eclipse.core.runtime;visibility:=reexport,org.ecli
+ pse.ui;visibility:=reexport,org.txm.groovy.core;bundle-version="1.0.0
+ ";visibility:=reexport,org.codehaus.groovy.eclipse.ui;bundle-version=
+ "2.9.1";visibility:=reexport
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.txm.groovy.ide.rcp.Activator
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-Vendor: Textometry.org
+Automatic-Module-Name: org.txm.groovy.rcp
+

Property changes on: TXM/trunk/org.txm.groovy.ide.rcp/META-INF/MANIFEST.MF
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: TXM/trunk/org.txm.groovy.ide.rcp/.project
===================================================================
--- TXM/trunk/org.txm.groovy.ide.rcp/.project	(revision 0)
+++ TXM/trunk/org.txm.groovy.ide.rcp/.project	(revision 3606)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.txm.groovy.ide.rcp</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Property changes on: TXM/trunk/org.txm.groovy.ide.rcp/.project
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: TXM/trunk/org.txm.groovy.ide.rcp/contexts.xml
===================================================================
--- TXM/trunk/org.txm.groovy.ide.rcp/contexts.xml	(revision 0)
+++ TXM/trunk/org.txm.groovy.ide.rcp/contexts.xml	(revision 3606)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<contexts>
+	<context id="viewer" title="Sample View">
+		<description>This is the context help for the sample view with a table
+			viewer. It was generated by a PDE template.</description>
+		<topic
+			href="/PLUGINS_ROOT/org.eclipse.platform.doc.isv/guide/ua_help_context.htm"
+			label="Context-sensitive help">
+			<enablement>
+				<with variable="platform">
+					<test property="org.eclipse.core.runtime.isBundleInstalled"
+						args="org.eclipse.platform.doc.isv" />
+				</with>
+			</enablement>
+		</topic>
+	</context>
+</contexts>

Property changes on: TXM/trunk/org.txm.groovy.ide.rcp/contexts.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: TXM/trunk/org.txm.groovy.ide.rcp/src/org/txm/groovy/ide/rcp/Activator.java
===================================================================
--- TXM/trunk/org.txm.groovy.ide.rcp/src/org/txm/groovy/ide/rcp/Activator.java	(revision 0)
+++ TXM/trunk/org.txm.groovy.ide.rcp/src/org/txm/groovy/ide/rcp/Activator.java	(revision 3606)
@@ -0,0 +1,18 @@
+package org.txm.groovy.ide.rcp;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+public class Activator extends AbstractUIPlugin {
+	
+	public Activator() {
+		// TODO Auto-generated constructor stub
+	}
+	
+	@Override
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+		
+		System.out.println("DISABLE CONTRIBUTIONS");
+	}
+}

Property changes on: TXM/trunk/org.txm.groovy.ide.rcp/src/org/txm/groovy/ide/rcp/Activator.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: TXM/trunk/org.txm.groovy.ide.rcp/src/org/txm/groovy/ide/rcp/views/SampleView.java
===================================================================
--- TXM/trunk/org.txm.groovy.ide.rcp/src/org/txm/groovy/ide/rcp/views/SampleView.java	(revision 0)
+++ TXM/trunk/org.txm.groovy.ide.rcp/src/org/txm/groovy/ide/rcp/views/SampleView.java	(revision 3606)
@@ -0,0 +1,201 @@
+package org.txm.groovy.ide.rcp.views;
+
+
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.part.*;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.jface.action.*;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.ui.*;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.SWT;
+
+
+/**
+ * This sample class demonstrates how to plug-in a new
+ * workbench view. The view shows data obtained from the
+ * model. The sample creates a dummy model on the fly,
+ * but a real implementation would connect to the model
+ * available either in this or another plug-in (e.g. the workspace).
+ * The view is connected to the model using a content provider.
+ * <p>
+ * The view uses a label provider to define how model
+ * objects should be presented in the view. Each
+ * view can present the same model objects using
+ * different labels and icons, if needed. Alternatively,
+ * a single label provider can be shared between views
+ * in order to ensure that objects of the same type are
+ * presented in the same way everywhere.
+ * <p>
+ */
+
+public class SampleView extends ViewPart {
+	
+	/**
+	 * The ID of the view as specified by the extension.
+	 */
+	public static final String ID = "org.txm.groovy.rcp.views.SampleView";
+	
+	private TableViewer viewer;
+	
+	private Action action1;
+	
+	private Action action2;
+	
+	private Action doubleClickAction;
+	
+	/*
+	 * The content provider class is responsible for
+	 * providing objects to the view. It can wrap
+	 * existing objects in adapters or simply return
+	 * objects as-is. These objects may be sensitive
+	 * to the current input of the view, or ignore
+	 * it and always show the same content
+	 * (like Task List, for example).
+	 */
+	
+	class ViewContentProvider implements IStructuredContentProvider {
+		
+		public void inputChanged(Viewer v, Object oldInput, Object newInput) {}
+		
+		public void dispose() {}
+		
+		public Object[] getElements(Object parent) {
+			return new String[] { "One", "Two", "Three" };
+		}
+	}
+	
+	class ViewLabelProvider extends LabelProvider implements ITableLabelProvider {
+		
+		public String getColumnText(Object obj, int index) {
+			return getText(obj);
+		}
+		
+		public Image getColumnImage(Object obj, int index) {
+			return getImage(obj);
+		}
+		
+		public Image getImage(Object obj) {
+			return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_ELEMENT);
+		}
+	}
+	
+	class NameSorter extends ViewerSorter {
+	}
+	
+	/**
+	 * The constructor.
+	 */
+	public SampleView() {}
+	
+	/**
+	 * This is a callback that will allow us
+	 * to create the viewer and initialize it.
+	 */
+	public void createPartControl(Composite parent) {
+		viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
+		viewer.setContentProvider(new ViewContentProvider());
+		viewer.setLabelProvider(new ViewLabelProvider());
+		viewer.setSorter(new NameSorter());
+		viewer.setInput(getViewSite());
+		
+		// Create the help context id for the viewer's control
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(viewer.getControl(), "org.txm.groovy.rcp.viewer");
+		makeActions();
+		hookContextMenu();
+		hookDoubleClickAction();
+		contributeToActionBars();
+	}
+	
+	private void hookContextMenu() {
+		MenuManager menuMgr = new MenuManager("#PopupMenu");
+		menuMgr.setRemoveAllWhenShown(true);
+		menuMgr.addMenuListener(new IMenuListener() {
+			
+			public void menuAboutToShow(IMenuManager manager) {
+				SampleView.this.fillContextMenu(manager);
+			}
+		});
+		Menu menu = menuMgr.createContextMenu(viewer.getControl());
+		viewer.getControl().setMenu(menu);
+		getSite().registerContextMenu(menuMgr, viewer);
+	}
+	
+	private void contributeToActionBars() {
+		IActionBars bars = getViewSite().getActionBars();
+		fillLocalPullDown(bars.getMenuManager());
+		fillLocalToolBar(bars.getToolBarManager());
+	}
+	
+	private void fillLocalPullDown(IMenuManager manager) {
+		manager.add(action1);
+		manager.add(new Separator());
+		manager.add(action2);
+	}
+	
+	private void fillContextMenu(IMenuManager manager) {
+		manager.add(action1);
+		manager.add(action2);
+		// Other plug-ins can contribute there actions here
+		manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
+	}
+	
+	private void fillLocalToolBar(IToolBarManager manager) {
+		manager.add(action1);
+		manager.add(action2);
+	}
+	
+	private void makeActions() {
+		action1 = new Action() {
+			
+			public void run() {
+				showMessage("Action 1 executed");
+			}
+		};
+		action1.setText("Action 1");
+		action1.setToolTipText("Action 1 tooltip");
+		action1.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJS_INFO_TSK));
+		
+		action2 = new Action() {
+			
+			public void run() {
+				showMessage("Action 2 executed");
+			}
+		};
+		action2.setText("Action 2");
+		action2.setToolTipText("Action 2 tooltip");
+		action2.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJS_INFO_TSK));
+		doubleClickAction = new Action() {
+			
+			public void run() {
+				ISelection selection = viewer.getSelection();
+				Object obj = ((IStructuredSelection) selection).getFirstElement();
+				showMessage("Double-click detected on " + obj.toString());
+			}
+		};
+	}
+	
+	private void hookDoubleClickAction() {
+		viewer.addDoubleClickListener(new IDoubleClickListener() {
+			
+			public void doubleClick(DoubleClickEvent event) {
+				doubleClickAction.run();
+			}
+		});
+	}
+	
+	private void showMessage(String message) {
+		MessageDialog.openInformation(
+				viewer.getControl().getShell(),
+				"Sample View",
+				message);
+	}
+	
+	/**
+	 * Passing the focus request to the viewer's control.
+	 */
+	public void setFocus() {
+		viewer.getControl().setFocus();
+	}
+}

Property changes on: TXM/trunk/org.txm.groovy.ide.rcp/src/org/txm/groovy/ide/rcp/views/SampleView.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

