1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-24 08:44:01 +02:00

[223126] fix: [api][breaking] Remove API related to User Actions in RSE Core/UI

This commit is contained in:
Xuan Chen 2008-03-19 15:54:25 +00:00
parent c2a78bd6d9
commit d87be9980f
20 changed files with 239 additions and 404 deletions

View file

@ -1,219 +1,212 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html> <html>
<head> <head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." > <meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css"> <LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
<title>DeveloperResourceAdapter Class After Editing</title> <title>DeveloperResourceAdapter Class After Editing</title>
</head> </head>
<body> <body>
<h1>DeveloperResourceAdapter Class After Editing</h1> <h1>DeveloperResourceAdapter Class After Editing</h1>
<pre><samp> <pre><samp>
package samples.model; package samples.model;
import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.rse.ui.SystemMenuManager; import org.eclipse.rse.ui.SystemMenuManager;
import org.eclipse.rse.ui.view.AbstractSystemViewAdapter; import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter; import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Shell;
<strong>import org.eclipse.ui.views.properties.IPropertyDescriptor;</strong> <strong>import org.eclipse.ui.views.properties.IPropertyDescriptor;</strong>
<strong>import org.eclipse.ui.views.properties.PropertyDescriptor;</strong> <strong>import org.eclipse.ui.views.properties.PropertyDescriptor;</strong>
<strong>import samples.RSESamplesPlugin;</strong> <strong>import samples.RSESamplesPlugin;</strong>
/** /**
* This is the adapter which enables us to work with our remote developer resources. * This is the adapter which enables us to work with our remote developer resources.
*/ */
public class DeveloperResourceAdapter extends AbstractSystemViewAdapter public class DeveloperResourceAdapter extends AbstractSystemViewAdapter
implements ISystemRemoteElementAdapter implements ISystemRemoteElementAdapter
{ {
/** /**
* Constructor * Constructor
*/ */
public DeveloperResourceAdapter() { public DeveloperResourceAdapter() {
super(); super();
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#addActions(org.eclipse.rse.ui.SystemMenuManager, * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#addActions(org.eclipse.rse.ui.SystemMenuManager,
* org.eclipse.jface.viewers.IStructuredSelection, org.eclipse.swt.widgets.Shell, java.lang.String) * org.eclipse.jface.viewers.IStructuredSelection, org.eclipse.swt.widgets.Shell, java.lang.String)
*/ */
public void addActions(SystemMenuManager menu, public void addActions(SystemMenuManager menu,
IStructuredSelection selection, Shell parent, String menuGroup) IStructuredSelection selection, Shell parent, String menuGroup)
{ {
} }
/** /**
* @see org.eclipse.ui.model.IWorkbenchAdapter#getImageDescriptor(Object) * @see org.eclipse.ui.model.IWorkbenchAdapter#getImageDescriptor(Object)
*/ */
public ImageDescriptor getImageDescriptor(Object object) public ImageDescriptor getImageDescriptor(Object object)
{ {
<strong>return RSESamplesPlugin.getDefault().getImageDescriptor("ICON_ID_DEVELOPER");</strong> <strong>return RSESamplesPlugin.getDefault().getImageDescriptor("ICON_ID_DEVELOPER");</strong>
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#getText(java.lang.Object) * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#getText(java.lang.Object)
*/ */
public String getText(Object element) public String getText(Object element)
{ {
<strong>return ((DeveloperResource)element).getName();</strong> <strong>return ((DeveloperResource)element).getName();</strong>
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#getAbsoluteName(java.lang.Object) * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#getAbsoluteName(java.lang.Object)
*/ */
public String getAbsoluteName(Object object) public String getAbsoluteName(Object object)
{ {
<strong>DeveloperResource devr = (DeveloperResource)object;</strong> <strong>DeveloperResource devr = (DeveloperResource)object;</strong>
r<strong>eturn "Devr_" + devr.getId();</strong> r<strong>eturn "Devr_" + devr.getId();</strong>
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#getType(java.lang.Object) * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#getType(java.lang.Object)
*/ */
public String getType(Object element) public String getType(Object element)
{ {
<strong>return RSESamplesPlugin.getResourceString("property.devr_resource.type");</strong> <strong>return RSESamplesPlugin.getResourceString("property.devr_resource.type");</strong>
} }
/** /**
* @see org.eclipse.ui.model.IWorkbenchAdapter#getParent(Object) * @see org.eclipse.ui.model.IWorkbenchAdapter#getParent(Object)
*/ */
public Object getParent(Object o) public Object getParent(Object o)
{ {
return null; // not really used, which is good because it is ambiguous return null; // not really used, which is good because it is ambiguous
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#hasChildren(java.lang.Object) * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#hasChildren(java.lang.Object)
*/ */
public boolean hasChildren(Object element) public boolean hasChildren(Object element)
{ {
return false; return false;
} }
/** /**
* @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(Object) * @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(Object)
*/ */
public Object[] getChildren(Object o) public Object[] getChildren(Object o)
{ {
return null; return null;
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#internalGetPropertyDescriptors() * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#internalGetPropertyDescriptors()
*/ */
protected IPropertyDescriptor[] internalGetPropertyDescriptors() protected IPropertyDescriptor[] internalGetPropertyDescriptors()
{ {
// the following array should be made static to it isn't created every time // the following array should be made static to it isn't created every time
<strong>PropertyDescriptor[] ourPDs = new PropertyDescriptor[2];</strong> <strong>PropertyDescriptor[] ourPDs = new PropertyDescriptor[2];</strong>
<strong>ourPDs[0] = new PropertyDescriptor("devr_id", RSESamplesPlugin.getResourceString("property.devr_id.name"));</strong> <strong>ourPDs[0] = new PropertyDescriptor("devr_id", RSESamplesPlugin.getResourceString("property.devr_id.name"));</strong>
<strong>ourPDs[0].setDescription(RSESamplesPlugin.getResourceString("property.devr_id.desc"));</strong> <strong>ourPDs[0].setDescription(RSESamplesPlugin.getResourceString("property.devr_id.desc"));</strong>
<strong>ourPDs[1] = new PropertyDescriptor("devr_dept", RSESamplesPlugin.getResourceString("property.devr_dept.name"));</strong> <strong>ourPDs[1] = new PropertyDescriptor("devr_dept", RSESamplesPlugin.getResourceString("property.devr_dept.name"));</strong>
<strong>ourPDs[1].setDescription(RSESamplesPlugin.getResourceString("property.devr_dept.desc"));</strong> <strong>ourPDs[1].setDescription(RSESamplesPlugin.getResourceString("property.devr_dept.desc"));</strong>
<strong>return ourPDs;</strong> <strong>return ourPDs;</strong>
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#internalGetPropertyValue(java.lang.Object) * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#internalGetPropertyValue(java.lang.Object)
*/ */
protected Object internalGetPropertyValue(Object key) protected Object internalGetPropertyValue(Object key)
{ {
// propertySourceInput holds the currently selected object // propertySourceInput holds the currently selected object
<strong>DeveloperResource devr = (DeveloperResource)propertySourceInput; <strong>DeveloperResource devr = (DeveloperResource)propertySourceInput;
if (key.equals("devr_id")) if (key.equals("devr_id"))
return devr.getId(); return devr.getId();
else if (key.equals("devr_dept")) else if (key.equals("devr_dept"))
return devr.getDeptNbr(); return devr.getDeptNbr();
return null;</strong> return null;</strong>
} }
// -------------------------------------- // --------------------------------------
// ISystemRemoteElementAdapter methods... // ISystemRemoteElementAdapter methods...
// -------------------------------------- // --------------------------------------
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getAbsoluteParentName(java.lang.Object) * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getAbsoluteParentName(java.lang.Object)
*/ */
public String getAbsoluteParentName(Object element) public String getAbsoluteParentName(Object element)
{ {
<strong>return "root";</strong> // not really applicable as we have no unique hierarchy <strong>return "root";</strong> // not really applicable as we have no unique hierarchy
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getSubSystemConfigurationId(java.lang.Object) * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getSubSystemConfigurationId(java.lang.Object)
*/ */
public String getSubSystemConfigurationId(Object element) public String getSubSystemConfigurationId(Object element)
{ {
<strong>return "samples.subsystems.factory";</strong> // as declared in extension in plugin.xml <strong>return "samples.subsystems.factory";</strong> // as declared in extension in plugin.xml
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteTypeCategory(java.lang.Object) * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteTypeCategory(java.lang.Object)
*/ */
public String getRemoteTypeCategory(Object element) public String getRemoteTypeCategory(Object element)
{ {
<strong>return "developers";</strong> // Course grained. Same for all our remote resources. <strong>return "developers";</strong> // Course grained. Same for all our remote resources.
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteType(java.lang.Object) * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteType(java.lang.Object)
*/ */
public String getRemoteType(Object element) public String getRemoteType(Object element)
{ {
<strong>return "developer";</strong> // Fine grained. Unique to this resource type. <strong>return "developer";</strong> // Fine grained. Unique to this resource type.
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteSubType(java.lang.Object) * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteSubType(java.lang.Object)
*/ */
public String getRemoteSubType(Object element) public String getRemoteSubType(Object element)
{ {
return null; // Very fine grained. We don't use it. return null; // Very fine grained. We don't use it.
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#refreshRemoteObject(java.lang.Object, java.lang.Object) * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#refreshRemoteObject(java.lang.Object, java.lang.Object)
*/ */
public boolean refreshRemoteObject(Object oldElement, Object newElement) public boolean refreshRemoteObject(Object oldElement, Object newElement)
{ {
<strong>DeveloperResource oldDevr= (DeveloperResource)oldElement; <strong>DeveloperResource oldDevr= (DeveloperResource)oldElement;
DeveloperResource newDevr = (DeveloperResource)newElement; DeveloperResource newDevr = (DeveloperResource)newElement;
newDevr.setName(oldDevr.getName()); newDevr.setName(oldDevr.getName());
return false;</strong> return false;</strong>
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteParent(org.eclipse.swt.widgets.Shell, java.lang.Object) * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteParent(org.eclipse.swt.widgets.Shell, java.lang.Object)
*/ */
public Object getRemoteParent(Shell shell, Object element) throws Exception public Object getRemoteParent(Shell shell, Object element) throws Exception
{ {
return null; // maybe this would be a Department obj, if we fully fleshed out our model return null; // maybe this would be a Department obj, if we fully fleshed out our model
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteParentNamesInUse(org.eclipse.swt.widgets.Shell, java.lang.Object) * @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#getRemoteParentNamesInUse(org.eclipse.swt.widgets.Shell, java.lang.Object)
*/ */
public String[] getRemoteParentNamesInUse(Shell shell, Object element) public String[] getRemoteParentNamesInUse(Shell shell, Object element)
throws Exception throws Exception
{ {
// developers names do not have to be unique! So we don't need to implement this! // developers names do not have to be unique! So we don't need to implement this!
return null; return null;
} }
/* (non-Javadoc) }
* @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#supportsUserDefinedActions(java.lang.Object) </samp></pre>
*/ </body>
public boolean supportsUserDefinedActions(Object object) { </html>
<strong>return false;</strong>
}
}
</samp></pre>
</body>
</html>

View file

@ -39,7 +39,7 @@ public class TeamResourceAdapter extends AbstractSystemViewAdapter implements
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#addActions(org.eclipse.rse.ui.SystemMenuManager, * @see org.eclipse.rse.ui.view.AbstractSystemViewAdapter#addActions(org.eclipse.rse.ui.SystemMenuManager,
* org.eclipse.jface.viewers.IStructuredSelection, org.eclipse.swt.widgets.Shell, java.lang.String) * org.eclipse.jface.viewers.IStructuredSelection, org.eclipse.swt.widgets.Shell, java.lang.String)
*/ */
public void addActions(SystemMenuManager menu, public void addActions(SystemMenuManager menu,
@ -130,7 +130,7 @@ public class TeamResourceAdapter extends AbstractSystemViewAdapter implements
} }
/** /**
* Intercept of parent method to actually do the rename. RSE supplies the rename GUI, but * Intercept of parent method to actually do the rename. RSE supplies the rename GUI, but
* defers the action work of renaming to this adapter method. * defers the action work of renaming to this adapter method.
*/ */
<a id="doRename"></a>public boolean doRename(Shell shell, Object element, String newName) <a id="doRename"></a>public boolean doRename(Shell shell, Object element, String newName)
@ -155,7 +155,7 @@ public class TeamResourceAdapter extends AbstractSystemViewAdapter implements
*/ */
public String getSubSystemConfigurationId(Object element) public String getSubSystemConfigurationId(Object element)
{ {
<strong>return "samples.subsystems.factory";</strong> // as declared in extension in plugin.xml <strong>return "samples.subsystems.factory";</strong> // as declared in extension in plugin.xml
} }
/* (non-Javadoc) /* (non-Javadoc)
@ -198,7 +198,7 @@ public class TeamResourceAdapter extends AbstractSystemViewAdapter implements
*/ */
public Object getRemoteParent(Shell shell, Object element) throws Exception public Object getRemoteParent(Shell shell, Object element) throws Exception
{ {
return null; // maybe this would be a Project or Roster object, or leave as null if this is the root return null; // maybe this would be a Project or Roster object, or leave as null if this is the root
} }
/* (non-Javadoc) /* (non-Javadoc)
@ -214,14 +214,6 @@ public class TeamResourceAdapter extends AbstractSystemViewAdapter implements
allNames[idx] = allTeams[idx].getName(); allNames[idx] = allTeams[idx].getName();
return allNames;</strong> // Return list of all team names return allNames;</strong> // Return list of all team names
} }
/* (non-Javadoc)
* @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#supportsUserDefinedActions(java.lang.Object)
*/
public boolean supportsUserDefinedActions(Object object) {
<strong>return false;</strong>
}
} }
</samp></pre> </samp></pre>
</body> </body>

View file

@ -12,6 +12,7 @@
* *
* Contributors: * Contributors:
* Martin Oberhuber (Wind River) - adapted template for daytime example. * Martin Oberhuber (Wind River) - adapted template for daytime example.
* Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.examples.daytime.model; package org.eclipse.rse.examples.daytime.model;
@ -132,9 +133,4 @@ public class DaytimeResourceAdapter extends AbstractSystemViewAdapter implements
String[] allLabels = new String[] { time }; String[] allLabels = new String[] { time };
return allLabels; // Return list of all labels return allLabels; // Return list of all labels
} }
public boolean supportsUserDefinedActions(Object object) {
return false;
}
} }

View file

@ -12,6 +12,7 @@
* *
* Contributors: * Contributors:
* Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE. * Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
* Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
********************************************************************************/ ********************************************************************************/
package samples.model; package samples.model;
@ -211,12 +212,4 @@ public class DeveloperResourceAdapter extends AbstractSystemViewAdapter
return null; return null;
} }
/* (non-Javadoc)
* @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#supportsUserDefinedActions(java.lang.Object)
*/
public boolean supportsUserDefinedActions(Object object) {
return false;
}
} }

View file

@ -13,6 +13,7 @@
* Contributors: * Contributors:
* Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE. * Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
* Xuan Chen (IBM) - [160775] [api] [breaking] [nl] rename (at least within a zip) blocks UI thread * Xuan Chen (IBM) - [160775] [api] [breaking] [nl] rename (at least within a zip) blocks UI thread
* Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
********************************************************************************/ ********************************************************************************/
package samples.model; package samples.model;
@ -224,12 +225,4 @@ public class TeamResourceAdapter extends AbstractSystemViewAdapter implements
allNames[idx] = allTeams[idx].getName(); allNames[idx] = allTeams[idx].getName();
return allNames; // Return list of all team names return allNames; // Return list of all team names
} }
/* (non-Javadoc)
* @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#supportsUserDefinedActions(java.lang.Object)
*/
public boolean supportsUserDefinedActions(Object object) {
return false;
}
} }

View file

@ -17,6 +17,7 @@
* Martin Oberhuber (Wind River) - [189123] Move renameSubSystemProfile() from UI to Core * Martin Oberhuber (Wind River) - [189123] Move renameSubSystemProfile() from UI to Core
* David Dykstal (IBM) - [197036] change signature of getFilterPoolManager method to be able to control the creation of filter pools * David Dykstal (IBM) - [197036] change signature of getFilterPoolManager method to be able to control the creation of filter pools
* David Dykstal (IBM) - [217556] remove service subsystem types * David Dykstal (IBM) - [217556] remove service subsystem types
* Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.core.subsystems; package org.eclipse.rse.core.subsystems;
@ -182,20 +183,6 @@ public interface ISubSystemConfiguration extends ISystemFilterPoolManagerProvide
*/ */
public boolean providesCustomDropInFilters(); public boolean providesCustomDropInFilters();
/**
* Return true if you support user-defined actions for the remote system objects returned from expansion of
* subsystems created by this subsystem factory
* <p>Returns false in default implementation.
*/
public boolean supportsUserDefinedActions();
/**
* Return true if you support compile actions for the remote system objects returned from expansion of
* subsystems created by this subsystem factory.
* <p>Returns false in default implementation.
*/
public boolean supportsCompileActions();
/** /**
* Return true if you support user-defined/managed named file types * Return true if you support user-defined/managed named file types
* <p>Returns false in default implementation. * <p>Returns false in default implementation.

View file

@ -47,6 +47,7 @@
* David McKnight (IBM) - [216252] [nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible * David McKnight (IBM) - [216252] [nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
* David McKnight (IBM) - [216252] MessageFormat.format -> NLS.bind * David McKnight (IBM) - [216252] MessageFormat.format -> NLS.bind
* David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
* Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.files.ui.view; package org.eclipse.rse.internal.files.ui.view;
@ -3627,29 +3628,4 @@ public class SystemViewRemoteFileAdapter
{ {
return new SystemFetchOperation(null, o, this, collector, true); return new SystemFetchOperation(null, o, this, collector, true);
} }
/**
* Returns <code>false</code> if the file is a virtual file, otherwise defaults to asking the subsystem
* factory.
* @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#supportsUserDefinedActions(java.lang.Object)
*/
public boolean supportsUserDefinedActions(Object object) {
// if object is an instance of a remote file
if (object instanceof IRemoteFile) {
IRemoteFile file = (IRemoteFile)object;
// virtual files do not support user defined actions
if (file instanceof IVirtualRemoteFile) {
return false;
}
else {
return getSubSystem(object).getSubSystemConfiguration().supportsUserDefinedActions();
}
}
else {
return getSubSystem(object).getSubSystemConfiguration().supportsUserDefinedActions();
}
}
} }

View file

@ -19,6 +19,7 @@
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
* Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
* David McKnight (IBM) - [216252] [nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible * David McKnight (IBM) - [216252] [nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
* Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.files.ui.view; package org.eclipse.rse.internal.files.ui.view;
@ -777,14 +778,6 @@ public class SystemViewRemoteSearchResultAdapter extends AbstractSystemViewAdapt
return null; return null;
} }
/**
* Returns <code>false</code>.
* @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#supportsUserDefinedActions(java.lang.Object)
*/
public boolean supportsUserDefinedActions(Object object) {
return false;
}
/** /**

View file

@ -15,6 +15,7 @@
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
* David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
* David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
* Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.files.ui.view; package org.eclipse.rse.internal.files.ui.view;
@ -356,12 +357,4 @@ public class SystemViewRemoteSearchResultSetAdapter extends AbstractSystemViewAd
} }
} }
/**
* Returns <code>false</code>.
* @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#supportsUserDefinedActions(java.lang.Object)
*/
public boolean supportsUserDefinedActions(Object object) {
return false;
}
} }

View file

@ -17,6 +17,7 @@
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
* David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
* David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
* Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.processes.ui.view; package org.eclipse.rse.internal.processes.ui.view;
@ -494,11 +495,6 @@ public class SystemViewRemoteProcessAdapter extends AbstractSystemViewAdapter
}*/ }*/
return false; return false;
} }
public boolean supportsUserDefinedActions(Object object)
{
return false;
}
/* /*
* Return whether deferred queries are supported. * Return whether deferred queries are supported.

View file

@ -13,6 +13,7 @@
* *
* Contributors: * Contributors:
* David McKnight (IBM) - [216252] [nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible * David McKnight (IBM) - [216252] [nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
* Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.shells.ui; package org.eclipse.rse.internal.shells.ui;
@ -71,6 +72,8 @@ public class ShellResources extends NLS
public static String ACTION_OPEN_OUTPUT_LABEL; public static String ACTION_OPEN_OUTPUT_LABEL;
public static String ACTION_OPEN_OUTPUT_TOOLTIP; public static String ACTION_OPEN_OUTPUT_TOOLTIP;
public static String ACTION_OPEN_WITH_LABEL;
// error properties // error properties
public static String RESID_PROPERTY_ERROR_FILENAME_LABEL; public static String RESID_PROPERTY_ERROR_FILENAME_LABEL;
public static String RESID_PROPERTY_ERROR_FILENAME_TOOLTIP; public static String RESID_PROPERTY_ERROR_FILENAME_TOOLTIP;

View file

@ -14,6 +14,7 @@
# Contributors: # Contributors:
# David McKnight (IBM) - [216252] [nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible # David McKnight (IBM) - [216252] [nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
# Radoslav Gerganov (ProSyst) - [181563] Fix hardcoded Ctrl+Space for remote shell content assist # Radoslav Gerganov (ProSyst) - [181563] Fix hardcoded Ctrl+Space for remote shell content assist
# Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
############################################################################### ###############################################################################
# NLS_MESSAGEFORMAT_VAR # NLS_MESSAGEFORMAT_VAR
@ -76,6 +77,8 @@ ACTION_EXPORT_SHELL_HISTORY_TOOLTIP=Export the command history for the selected
ACTION_OPEN_OUTPUT_LABEL= Goto ACTION_OPEN_OUTPUT_LABEL= Goto
ACTION_OPEN_OUTPUT_TOOLTIP= Open the selected output object in an editor or view ACTION_OPEN_OUTPUT_TOOLTIP= Open the selected output object in an editor or view
ACTION_OPEN_WITH_LABEL = Open Wit&h
#ERROR PROPERTIES #ERROR PROPERTIES
RESID_PROPERTY_ERROR_FILENAME_LABEL=File RESID_PROPERTY_ERROR_FILENAME_LABEL=File
RESID_PROPERTY_ERROR_FILENAME_TOOLTIP=File Containing Error RESID_PROPERTY_ERROR_FILENAME_TOOLTIP=File Containing Error

View file

@ -24,6 +24,7 @@
* Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
* David McKnight (IBM) - [189873] Improve remote shell editor open action with background jobs * David McKnight (IBM) - [189873] Improve remote shell editor open action with background jobs
* David McKnight (IBM) - [216252] [nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible * David McKnight (IBM) - [216252] [nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
* Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.shells.ui.view; package org.eclipse.rse.shells.ui.view;
@ -166,7 +167,7 @@ implements ISystemViewElementAdapter, ISystemRemoteElementAdapter
//createActions.create(menu, selection, shell, menuGroup); //createActions.create(menu, selection, shell, menuGroup);
// open with -> // open with ->
MenuManager submenu = MenuManager submenu =
new MenuManager(org.eclipse.ui.internal.views.navigator.ResourceNavigatorMessages.ResourceNavigator_openWith, new MenuManager(ShellResources.ACTION_OPEN_WITH_LABEL,
ISystemContextMenuConstants.GROUP_OPENWITH); ISystemContextMenuConstants.GROUP_OPENWITH);
SystemRemoteFileLineOpenWithMenu openWithMenu = new SystemRemoteFileLineOpenWithMenu(); SystemRemoteFileLineOpenWithMenu openWithMenu = new SystemRemoteFileLineOpenWithMenu();
@ -1129,15 +1130,6 @@ implements ISystemViewElementAdapter, ISystemRemoteElementAdapter
return ""; //$NON-NLS-1$ return ""; //$NON-NLS-1$
} }
/**
* Returns <code>false</code>.
* @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#supportsUserDefinedActions(java.lang.Object)
*/
public boolean supportsUserDefinedActions(Object object) {
return false;
}
/** /**
* Don't show properties for remote output * Don't show properties for remote output

View file

@ -17,6 +17,7 @@
* Martin Oberhuber (Wind River) - [189123] Move renameSubSystemProfile() from UI to Core * Martin Oberhuber (Wind River) - [189123] Move renameSubSystemProfile() from UI to Core
* David Dykstal (IBM) - [197036] fixed NPE found during testing * David Dykstal (IBM) - [197036] fixed NPE found during testing
* David Dykstal (IBM) - [222270] clean up interfaces in org.eclipse.rse.core.filters * David Dykstal (IBM) - [222270] clean up interfaces in org.eclipse.rse.core.filters
* Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.subsystems.files.core.subsystems; package org.eclipse.rse.subsystems.files.core.subsystems;
@ -224,16 +225,6 @@ public abstract class RemoteFileSubSystemConfiguration extends SubSystemConfigur
return true; return true;
} }
/**
* Return true if you support user-defined actions for the remote system objects returned from expansion of
* subsystems created by this subsystem factory.
* <p>We return true.
*/
public boolean supportsUserDefinedActions()
{
return true;
}
/** /**
* Return true if you support user-defined/managed named file types * Return true if you support user-defined/managed named file types
* <p>We return true * <p>We return true
@ -243,19 +234,6 @@ public abstract class RemoteFileSubSystemConfiguration extends SubSystemConfigur
return true; return true;
} }
/**
* Return true if you support compile actions for the remote system objects returned from expansion of
* subsystems created by this subsystem factory.
* <p>
* By returning true, user sees a "Work with->Compile Commands..." action item in the popup menu for this
* subsystem. The action is supplied by the framework, but is populated using overridable methods in this subsystem.
* <p>We return false, but really we expect subclasses to return true
*/
public boolean supportsCompileActions()
{
return false;
}
/* /*
* (non-Javadoc) * (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#renameSubSystemProfile(java.lang.String, java.lang.String) * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#renameSubSystemProfile(java.lang.String, java.lang.String)

View file

@ -15,6 +15,7 @@
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation * Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
* Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.ui.view; package org.eclipse.rse.internal.ui.view;
@ -269,14 +270,6 @@ public class SystemViewScratchpadAdapter extends AbstractSystemViewAdapter imple
{ {
return true; return true;
} }
/**
* Returns <code>false</code>.
* @see org.eclipse.rse.ui.view.ISystemRemoteElementAdapter#supportsUserDefinedActions(java.lang.Object)
*/
public boolean supportsUserDefinedActions(Object object) {
return false;
}
/** /**
* This is a local RSE artifact so returning false * This is a local RSE artifact so returning false

View file

@ -18,6 +18,7 @@
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
* David Dykstal (IBM) - [197036] rewrote getSubSystemConfigurationNodes to get filter pools * David Dykstal (IBM) - [197036] rewrote getSubSystemConfigurationNodes to get filter pools
* in a way that delays the loading of subsystem configurations * in a way that delays the loading of subsystem configurations
* Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.ui.view.team; package org.eclipse.rse.internal.ui.view.team;
@ -202,10 +203,6 @@ public class SystemTeamViewCategoryAdapter
boolean createNode = false; boolean createNode = false;
if (categoryType.equals(SystemTeamViewCategoryNode.MEMENTO_FILTERPOOLS)) { if (categoryType.equals(SystemTeamViewCategoryNode.MEMENTO_FILTERPOOLS)) {
createNode = ssf.supportsFilters() && (profile.getFilterPools(ssf).length > 0); createNode = ssf.supportsFilters() && (profile.getFilterPools(ssf).length > 0);
} else if (categoryType.equals(SystemTeamViewCategoryNode.MEMENTO_USERACTIONS)) {
createNode = ssf.supportsUserDefinedActions(); // && profile.getUserActions(ssf).length > 0;
} else if (categoryType.equals(SystemTeamViewCategoryNode.MEMENTO_COMPILECMDS)) {
createNode = ssf.supportsCompileActions(); // && profile.getCompileCommandTypes(ssf).length > 0;
} else if (categoryType.equals(SystemTeamViewCategoryNode.MEMENTO_TARGETS)) { } else if (categoryType.equals(SystemTeamViewCategoryNode.MEMENTO_TARGETS)) {
createNode = ssf.supportsTargets(); // && profile.getTargets(ssf).length > 0; createNode = ssf.supportsTargets(); // && profile.getTargets(ssf).length > 0;
} }

View file

@ -14,6 +14,7 @@
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation * Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
* Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.ui.view.team; package org.eclipse.rse.internal.ui.view.team;
@ -68,19 +69,6 @@ public class SystemTeamViewSubSystemConfigurationAdapter
SystemTeamViewCategoryNode category = ssfNode.getParentCategory(); SystemTeamViewCategoryNode category = ssfNode.getParentCategory();
String categoryType = category.getMementoHandle(); String categoryType = category.getMementoHandle();
// FIXME - user actions and compilecmds no longer coupled to core
// if (categoryType.equals(SystemTeamViewCategoryNode.MEMENTO_USERACTIONS) && ssfNode.getSubSystemConfiguration().supportsUserDefinedActions())
// {
// wwActionsAction.reset();
// wwActionsAction.setShell(shell);
// menu.add(menuGroup, wwActionsAction);
// }
// else if (categoryType.equals(SystemTeamViewCategoryNode.MEMENTO_COMPILECMDS) && ssfNode.getSubSystemConfiguration().supportsCompileActions())
// {
// wwCmdsAction.reset();
// wwCmdsAction.setShell(shell);
// menu.add(menuGroup, wwCmdsAction);
// }
if (categoryType.equals(SystemTeamViewCategoryNode.MEMENTO_FILTERPOOLS) && ssfNode.getSubSystemConfiguration().supportsFilters()) if (categoryType.equals(SystemTeamViewCategoryNode.MEMENTO_FILTERPOOLS) && ssfNode.getSubSystemConfiguration().supportsFilters())
{ {
wwPoolsAction.reset(); wwPoolsAction.reset();

View file

@ -13,6 +13,7 @@
* Contributors: * Contributors:
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation * Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
* Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin * Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
* Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.ui.view; package org.eclipse.rse.ui.view;
@ -142,12 +143,4 @@ public interface ISystemRemoteElementAdapter extends ISystemRemoteObjectMatchPro
*/ */
public String[] getRemoteParentNamesInUse(Object element, IProgressMonitor monitor) throws Exception; public String[] getRemoteParentNamesInUse(Object element, IProgressMonitor monitor) throws Exception;
/**
* Returns whether user defined actions should be shown for the object.
*
* @param object the object.
* @return <code>true</code> if the object supports user defined actions,
* <code>false</code> otherwise.
*/
public boolean supportsUserDefinedActions(Object object);
} }

View file

@ -31,6 +31,7 @@
* Martin Oberhuber (Wind River) - [cleanup] Avoid using SystemStartHere in production code * Martin Oberhuber (Wind River) - [cleanup] Avoid using SystemStartHere in production code
* David McKnight (IBM) - [220309] [nls] Some GenericMessages and SubSystemResources should move from UI to Core * David McKnight (IBM) - [220309] [nls] Some GenericMessages and SubSystemResources should move from UI to Core
* David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
* Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.core.subsystems; package org.eclipse.rse.core.subsystems;
@ -98,7 +99,6 @@ import org.eclipse.rse.ui.messages.SystemMessageDialog;
* <li>SubSystemConfiguration#isCaseSensitive() to indicate if filter strings are case sensitive or not * <li>SubSystemConfiguration#isCaseSensitive() to indicate if filter strings are case sensitive or not
* <li>SubSystemConfiguration#supportsQuickFilters() to indicate if filters can be specified at contain expansion time. * <li>SubSystemConfiguration#supportsQuickFilters() to indicate if filters can be specified at contain expansion time.
* <li>SubSystemConfiguration#supportsUserActions() to indicate if users can define their own actions for your subsystems' child objects. * <li>SubSystemConfiguration#supportsUserActions() to indicate if users can define their own actions for your subsystems' child objects.
* <li>SubSystemConfiguration#supportsCompileActions() to indicate if users can compile remote objects using menu actions
* <li>SubSystemConfiguration#supportsFileTypes() to indicate if users can define their own named file types. * <li>SubSystemConfiguration#supportsFileTypes() to indicate if users can define their own named file types.
* <li>SubSystemConfiguration#isSubSystemsDeletable() if they support user-deleting of subsystems. Default is false. * <li>SubSystemConfiguration#isSubSystemsDeletable() if they support user-deleting of subsystems. Default is false.
* <li>SubSystemConfiguration#supportsSubSystemConnect() to return false if the connect() action is not supported * <li>SubSystemConfiguration#supportsSubSystemConnect() to return false if the connect() action is not supported
@ -305,29 +305,6 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration
{ {
return false; return false;
} }
/**
* Return true if you support user-defined actions for the remote system objects returned from expansion of
* subsystems created by this subsystem configuration
* <p>RETURNS false BY DEFAULT
*/
public boolean supportsUserDefinedActions()
{
return false;
}
/**
* Return true if you support compile actions for the remote system objects returned from expansion of
* subsystems created by this subsystem configuration.
* <p>
* By returning true, user sees a "Work with->Compile Commands..." action item in the popup menu for this
* subsystem. The action is supplied by the framework, but is populated using overridable methods in this subsystem.
* <p>RETURNS false BY DEFAULT
*/
public boolean supportsCompileActions()
{
return false;
}
/** /**
* Return true if you support user-defined/managed named file types * Return true if you support user-defined/managed named file types

View file

@ -11,6 +11,7 @@
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
* David Dykstal (IBM) - [186589] move user actions API out of org.eclipse.rse.ui * David Dykstal (IBM) - [186589] move user actions API out of org.eclipse.rse.ui
* Martin Oberhuber (Wind River) - [cleanup] Avoid using SystemStartHere in production code * Martin Oberhuber (Wind River) - [cleanup] Avoid using SystemStartHere in production code
* Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.useractions.ui.compile; package org.eclipse.rse.internal.useractions.ui.compile;
@ -72,8 +73,6 @@ import org.eclipse.swt.widgets.Shell;
* user to easily insert these into his command string, and the SystemCompilableSource * user to easily insert these into his command string, and the SystemCompilableSource
* object is responsible for making the substitutions at runtime, given the compile * object is responsible for making the substitutions at runtime, given the compile
* command and selected source object. * command and selected source object.
* <li>For subsystem factory support of compiling, the factory provider simply returns true
* to supportsCompileActions() and implements the
* </ul> * </ul>
* @see SystemCompileProfile * @see SystemCompileProfile
* @see SystemCompileType * @see SystemCompileType