diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/popup.html b/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/popup.html deleted file mode 100755 index 3c39a717d93..00000000000 --- a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/popup.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - - - -Plugging In Popup Menu Actions - - - -

Plugging In Popup Menu Actions

-

The org.eclipse.rse.ui.popupMenus extension point is defined in the -plugin org.eclipse.rse.ui, and it is patterned -after Eclipse's org.eclipse.ui.popupMenus extension point. However, it is -both simplified and extended specifically for remote objects. -

-

The primary element in the markup for this extension point is the <objectContribution> element, -which scopes the remote objects to which the child elements apply: -

- -

Within each <objectContribution> element are zero or more <menu> elements for -optionally defining cascading submenus, and <action> elements for the actual actions. -To have the actions show up in a cascading menu, use the <menu> element with these -attributes: -

- -

Within each <menu> element are one or more <separator> elements that partition the cascading -menu into groups. Groups are simply named physical areas of the menu. The order in which they are defined is the order they -appear in the menu. Actions always go into groups. Groups avoid the need to specify relative information to identify where -within a pop-up menu to place actions. There is only one attribute for this element: -

- -

Finally, within <objectContribution> elements are one or more <action> elements identifying the -actual actions, each of which only show up if the scoping criteria is met for that parent <objectContribution> -element. The attributes for <action> elements are: -

- -

-The path attribute for the <menu> element, and the menubarPath attribute for the <action> -element, are the most difficult to master. The rules are reasonably simple though: -

-
    -
  1. To have your action show up in the initial pop-up menu, just specify a group name on the menubarPath attribute. That name can be -one of the RSE-supplied group names defined in Table 4, or your own group name, which will be created and appended to the end of the -pop-up menu. The default group is "additions". -
    Example: menubarPath="myGroup" -
  2. To have your action show up in a simple RSE-supplied cascading menu within the pop-up menu, in your <action> element, -specify the RSE-supplied menu ID from Table 4 in the menubarPath attribute, then a slash followed by the name of a group. The only -RSE-supplied group for cascading menus is "additions". If you specify anything else for the group, the group will be created for you -at the bottom of the menu. -
    Example: menubarPath="menu.new/myGroup" -
  3. To have your action show up in a simple cascading menu of your own, first define the menu with a <menu> element, -giving it an ID via the id attribute. In your <action> element, in the menubarPath attribute specify that id followed by a slash -and then the name of a group. That group name can be one specified on a <separator> element within your menu, or a new name, which -results in a new group at the bottom of the menu. In the latter case, there will be no separators delimiting the group, while in the former case -there will be. -
    Example: menubarPath="myMenu1/myGroup" -
  4. To have your action show up in a multi-cascading menu of your own, define each of the menu via <menu> elements. For all but the -first, identify the parent menu using the path attribute, specifying the Ids for each of the parent menus, slash-separated. At -the end of the path attribute, specify the group within the final parent menu into which this menu will be placed. Again, this -will either be a group defined with a <separator> element in the parent menu element, or specify a non-existing group that will be -created for you. Once your multi-cascading menu is created, you identify it in your <action> element via the menubarPath attribute, -specifying all the menu Ids up to the final menu, slash-separated, and then the group within that final menu, as usual. -
    Example: menubarPath="myMenu1/myMenu2/myGroup" -
- -

Programming Details

-

To use this extension point you will create a class that extends the -SystemAbstractPopupMenuExtensionAction class in the -package org.eclipse.rse.ui.actions. This is your action class, -and when the user selects your action, the run() -method in your action class will be called. You will rarely extend the SystemAbstractPopupMenuExtensionAction base class -directly, though. Instead there are subclasses of it that offer additional functionality for specific types of remote objects, -as shown here: -

- - - - - - - - - - - - - - - - - -
Base ClassDescription
SystemAbstractPopupMenuExtensionAction in - org.eclipse.rse.ui pluginBase class offering generic support for any remote object pop-up menu action, for any system type.
SystemAbstractRemoteFilePopupMenuExtensionAction - in org.eclipse.rse.files.ui pluginSpecialized base class offering specific support for any remote file object pop-up menu action, for any system type.
- -

-

See the pop-up menu action tutorial for a step-by-step example.

- - diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/propertypage.html b/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/propertypage.html deleted file mode 100755 index d7d71a13ed3..00000000000 --- a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/propertypage.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - -Plugging In Property Pages - - - -

Plugging In Property Pages

-

The org.eclipse.rse.ui.propertyPages extension point is defined in the -plugin org.eclipse.rse.ui, and it is patterned after Eclipse's org.eclipse.ui.propertyPages extension point, but both -simplified and extended specifically for remote objects.
-What is a property page? -It is a page that shows up in the Eclipse Properties dialog that users -get to by right-clicking on an object within any tree or table view, and selecting -the Properties action.

-

Extenders supply one or more <page> elements within the beginning and ending <extension> element for this. -The attributes of this <page> element are:

- - -

Programming Details

-

To use this extension point your class will typically extend one of the supplied base classes to -make it easier to create these property pages for remote objects. The only method you must implement in these -classes is createContents(Composite), which populates the details page on the right side when the node is -selected on the left side. The supplied classes are listed here: -

- - - - - - - - - - - - - - - - -
Base ClassDescription
SystemAbstractPropertyPageExtensionAction - in org.eclipse.rse.ui plugin.Base class offering generic support for any remote object property page.
SystemAbstractRemoteFilePropertyPageExtensionAction - in org.eclipse.rse.files.ui plugin.Specialized base class offering specific support for any remote file object property page.
-

-

- -

-

See the property page tutorial for a step-by-step example.

- - diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/propertypage_figure1.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/propertypage_figure1.gif deleted file mode 100755 index 14bda64e820..00000000000 Binary files a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/propertypage_figure1.gif and /dev/null differ diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/propertypage_figure2.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/propertypage_figure2.gif deleted file mode 100755 index 7950bb9aa4a..00000000000 Binary files a/rse/doc/org.eclipse.rse.doc.isv/guide/plugin/propertypage_figure2.gif and /dev/null differ diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/popup.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/popup.html deleted file mode 100755 index bfdbcdd105f..00000000000 --- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/popup.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - -Creating a Remote Resource Popup Menu Action - - - -

Creating a Remote Resource pop-up Menu Action

-

In this tutorial, you will use the RSE pop-up menus -extension point to -create a pop-up menu action that will appear -in the context menu for any .jar file, for any connection to -any system type. The action will be labeled "Show contents" and will simply -run the jar -tvf JDK command when selected, displaying the results -in the command console. You could expand this example to copy the file -to a local temporary folder, extract the list of file names within the jar, and -display those names in an Eclipse table view. -

- -

Tip: If you prefer your Java code to use lined-up braces, select the -first two options in the Code -Formatter preferences page for Java, via Windows->Preferences. - -This will affect code generated by wizards. The source code shown assumes this option has been set, but this is not required. - -

Step-by-Step: Creating an RSE Remote Resource Pop-up Menu Action

- -
    -
  1. If you have not already, first create or prepare a plugin project. -
  2. -
  3. Open the plugin.xml file for editing by right-clicking on it and selecting -Open With->Text Editor. Before the ending </plugin> statement, add the following lines: -
    
    -   <!-- ======================================= -->
    -   <!-- Remote Object Popup Menu Actions        -->
    -   <!-- ======================================= -->
    -   <extension point="org.eclipse.rse.ui.popupMenus">
    -      <objectContribution id="actions.jar"
    -                          typecategoryfilter="files"
    -                          typefilter="file"
    -                          namefilter="*.jar">
    -           <action id="actions.jar.show"
    -                   enablesFor="1"
    -                   label="Show contents"
    -                   tooltip="List contents of this file"
    -                   class="samples.ui.actions.ShowJarContents">
    -           </action>
    -       </objectContribution>
    -    </extension>
    -
    -Save and close the file. -
  4. -
  5. -Create the Java package: right-click on the src source folder and select New->Package to open the New - Java Package wizard. Enter "samples.ui.actions" for the name of the package and press Finish.
  6. -
  7. -Create the Java class: right-click on the new "samples.ui.actions" package folder and select New->Class to open the New -Java Class wizard. Enter "ShowJarContents" for the Name -and "org.eclipse.rse.files.ui.actions.SystemAbstractRemoteFilePopupMenuExtensionAction" -for the Superclass. Select the Constructors from superclass check box, as shown -here. -Press Finish to create the ShowJarContents class. -
  8. -
  9. Edit the generated ShowJarContents.java file as follows: -
      -
    1. Add the following three statements to the body of the run() method:
    2. -
      
      -		IRemoteFile selectedFile = getFirstSelectedRemoteFile();
      -		String cmdToRun = "jar -tvf " + selectedFile.getAbsolutePath();
      -		runCommand(cmdToRun);  
      -  
      -
    3. Add the following two methods to find the subsystem and run the command:
    4. -
      
      -	private void runCommand(String command) {
      -		IRemoteCmdSubSystem cmdss = getRemoteCmdSubSystem();
      -		if (cmdss != null && cmdss.isConnected()) {
      -			RemoteCommandHelpers.runUniversalCommand(getShell(), command, ".", cmdss);
      -		} else {
      -			MessageDialog.openError(getShell(), "No command subsystem", "Found no command subsystem");
      -		}
      -	}
      -	
      -	/**
      -	 * Gets the Command subsystem associated with the current host
      -	 */
      -	private IRemoteCmdSubSystem getRemoteCmdSubSystem() {
      -		IHost myHost = getSubSystem().getHost();
      -		IRemoteCmdSubSystem[] subsys = RemoteCommandHelpers.getCmdSubSystems(myHost);
      -		for (int i = 0; i < subsys.length; i++) {
      -			if (subsys[i].getSubSystemConfiguration().supportsCommands()) {
      -				return subsys[i];
      -			}
      -		}
      -		return null;
      -	}
      -  
      -
    5. User the "Source -> Organize Imports" context menu item to add the appropriate import statements.
    6. -
    -The final result after editing is shown here. -
  10. -
- -

Thats it! Now, you can try your new action. Use Run->Run As->Run-time Workbench. Drill -down in the RSE to a Jar file in a local or remote connection and right-click to see and run your new action. Notice -how it does not appear for files that do not end with the ".jar" extension. This is because of the "namefilter" attribute -in our extension point .xml file. - - diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/popup_newClass.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/popup_newClass.gif deleted file mode 100755 index 1e097dc6b0a..00000000000 Binary files a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/popup_newClass.gif and /dev/null differ diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/popup_run.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/popup_run.gif deleted file mode 100755 index e6646d36a48..00000000000 Binary files a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/popup_run.gif and /dev/null differ diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/popup_see.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/popup_see.gif deleted file mode 100755 index 5a1734fe85c..00000000000 Binary files a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/popup_see.gif and /dev/null differ diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/propertypage.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/propertypage.html deleted file mode 100755 index 22aeaa128e4..00000000000 --- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/propertypage.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - -Creating a Remote Resource Property Page - - - -

Creating a Remote Resource Property Page

-

In this tutorial, you will use the RSE propertyPage -extension point to -create a property page that will appear -in the Properties dialog for any folder, for any connection to -any system type. The page will be labeled "Folder Contents" and will show the -cumulative size of the contents of the folder, and the number of folders and files within it. -This will show the extension point, plus how to use some of the RSE user interface helpers, as well -as the remote file API for querying information about remote folders and files. -

- -

Tip: If you prefer your Java code to use lined-up braces, select the -first two options in the Code -Formatter preferences page for Java, via Windows->Preferences. - -This will affect code generated by wizards. The source code shown assumes this option has been set, but this is not required. - - - - -

Step-by-Step: Creating a Remote Resource Property Page

-
    -
  1. If you have not already, first create or prepare a plugin project. - -Open the plugin.xml file for editing by right-clicking on it, and selecting -Open With->Text Editor. Before the ending </plugin> statement, add the following lines: -
    
    -   <!-- ======================================= -->
    -   <!-- Remote Object Property Pages            -->
    -   <!-- ======================================= -->
    -   <extension point="org.eclipse.rse.ui.propertyPages">
    -       <page name="Folder Contents"
    -             class="samples.ui.propertypages.FolderInfoPropertyPage"
    -             id="samples.ui.PropertyPage1"
    -             typefilter="folder"
    -             typecategoryfilter="files">
    -        </page>
    -   </extension>    
    -
    -
  2. -
  3. Save and close the file.
  4. -
  5. -Create the Java package: right-click on the src source folder and select New->Package to get the New - Java Package wizard. Enter "samples.ui.propertypages" for the name of the package and press Finish.
  6. -
  7. -Create the Java class: right-click on the new "samples.ui.propertypages" package folder and select New->Class to open the New -Java Class wizard. Enter "FolderInfoPropertyPage" for the Name -and "org.eclipse.rse.files.ui.propertypages.SystemAbstractRemoteFilePropertyPageExtensionAction" -for the Superclass. Select the Constructors from superclass check box, as shown -here. -Press Finish to create the FolderInfoPropertyPage class. -
  8. -
  9. Edit the FolderInfoPropertyPage class to look like this. There are many changes, so you should use -the clipboard to copy and paste. -
  10. -
  11. Edit the rseSamplesMesssage.xml file to look like this, where the changes are highlighted. -
  12. -
  13. Edit the rseSamplesResources.properties file to look like this. -
  14. -
- -

Thats it! Now, you can try out your new property page. Use Run->Run As->Run-time Workbench. Drill -down in the RSE to a folder in a local or remote connection and right-click to see -and run your new property page. This sample is a unique case, in that this operation could potentially run for a long time, as you are recursively walking all -the sub-folders and files to accumulate the size and count information. Because of this, we put this work -in a background thread, and update the GUI as each sub-folder is processed. We also supply a stop button -to the user and watch for them pressing Cancel or closing the dialog. When the thread ends, the -result looks like this. -

Notice how this property page only appears for folders, due to the typefilter="folder" attribute -in our extension point xml. - - \ No newline at end of file diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/propertypage_newClass.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/propertypage_newClass.gif deleted file mode 100755 index 32531d37c14..00000000000 Binary files a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/propertypage_newClass.gif and /dev/null differ diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/propertypage_run_done.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/propertypage_run_done.gif deleted file mode 100755 index 084a08ecf48..00000000000 Binary files a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/propertypage_run_done.gif and /dev/null differ diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/propertypage_run_during.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/propertypage_run_during.gif deleted file mode 100755 index b14fcf530c6..00000000000 Binary files a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/propertypage_run_during.gif and /dev/null differ diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/propertypage_see.gif b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/propertypage_see.gif deleted file mode 100755 index 9f5d4882d0c..00000000000 Binary files a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorial/propertypage_see.gif and /dev/null differ diff --git a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorials.html b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorials.html index fe3fb0ce224..74c6e81c8e0 100755 --- a/rse/doc/org.eclipse.rse.doc.isv/guide/tutorials.html +++ b/rse/doc/org.eclipse.rse.doc.isv/guide/tutorials.html @@ -13,8 +13,8 @@

This section walks through the tutorials that demonstrate how to use the RSE extension points to extend the RSE:

The source code for all tutorials is available in the RSE-examples package, which diff --git a/rse/doc/org.eclipse.rse.doc.isv/reference/extension-points/index.html b/rse/doc/org.eclipse.rse.doc.isv/reference/extension-points/index.html index 4686f958f0c..66a1bb4efa6 100755 --- a/rse/doc/org.eclipse.rse.doc.isv/reference/extension-points/index.html +++ b/rse/doc/org.eclipse.rse.doc.isv/reference/extension-points/index.html @@ -21,8 +21,6 @@

  • org.eclipse.rse.ui.mountPathMappers
  • org.eclipse.rse.ui.newConnectionWizardDelegates
  • org.eclipse.rse.ui.persistenceProviders
  • -
  • org.eclipse.rse.ui.popupMenus
  • -
  • org.eclipse.rse.ui.propertyPages
  • org.eclipse.rse.ui.remoteSystemsViewPreferencesActions
  • org.eclipse.rse.ui.subsystemConfigurations
  • diff --git a/rse/doc/org.eclipse.rse.doc.isv/topics_Reference.xml b/rse/doc/org.eclipse.rse.doc.isv/topics_Reference.xml index d4204c70a9f..2b784d3d944 100755 --- a/rse/doc/org.eclipse.rse.doc.isv/topics_Reference.xml +++ b/rse/doc/org.eclipse.rse.doc.isv/topics_Reference.xml @@ -16,8 +16,6 @@ - -