Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Schwarz2013-12-19 05:54:06 -0500
committerTobias Schwarz2013-12-19 05:54:06 -0500
commitf0f4baeea56babed12127580c80092fd993a963b (patch)
tree2770d8b775ecd7f5df20c03e7b54232ffac646bd
parent7fb8b83faf758f57321cbb70b52b813abe69aa69 (diff)
downloadorg.eclipse.tcf-f0f4baeea56babed12127580c80092fd993a963b.tar.gz
org.eclipse.tcf-f0f4baeea56babed12127580c80092fd993a963b.tar.xz
org.eclipse.tcf-f0f4baeea56babed12127580c80092fd993a963b.zip
Target Explorer: property view
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/FSTreeNodeAdapterFactory.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/internal/services/PathMapService.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerNodeProvider.java8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/adapters/AdapterFactory.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/adapters/PeerPersistableURIProvider.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nodes/PeerNode.java11
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/persistence/GsonPeerPersistenceDelegate.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/nodes/ProcessContextNode.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/runtime/RuntimeModel.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/runtime/services/RuntimeModelChannelService.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.properties4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.xml79
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/adapters/AdapterFactory.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/properties/AdvancedPropertiesPage.java78
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/properties/ContextPage.java134
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/properties/GeneralInformationPage.java132
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/AdvancedPropertiesSection.java103
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/MapEntryLabelProvider.java49
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/ProcessContextFilter.java33
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/ProcessNodePropertiesSection.java55
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/ProcessPropertiesFilter.java29
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/SystemMonitorContextPropertiesSection.java54
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/navigator/runtime/ContentProvider.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/navigator/runtime/LabelProviderDelegate.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/nls/Messages.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/nls/Messages.properties4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/search/ProcessSearchable.java8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/plugin.xml24
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/adapters/AdapterFactory.java7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerGeneralSection.java108
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerNodePropertiesSection.java54
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerNodePropertiesSectionContentProvider.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerGeneralSectionContentProvider.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerNodePropertiesSectionLabelProvider.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerGeneralSectionLabelProvider.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerNodeSectionFilter.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerGeneralSectionFilter.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerPropertiesSection.java74
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerSectionFilter.java29
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/nls/Messages.java6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/nls/Messages.properties5
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/tabbed/AbstractMapPropertiesSection.java93
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/tabbed/BaseTitledSection.java19
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/tabbed/MapContentProvider.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/MapContentProvider.java)101
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/tabbed/MapLabelProvider.java59
42 files changed, 647 insertions, 755 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/FSTreeNodeAdapterFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/FSTreeNodeAdapterFactory.java
index 647c2974c..c08e55d16 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/FSTreeNodeAdapterFactory.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/FSTreeNodeAdapterFactory.java
@@ -60,7 +60,7 @@ public class FSTreeNodeAdapterFactory implements IAdapterFactory {
* @see org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNodeProvider#getPeerModel()
*/
@Override
- public final IPeerNode getPeerModel() {
+ public final IPeerNode getPeerNode() {
return node.peerNode;
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/internal/services/PathMapService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/internal/services/PathMapService.java
index c79c4bf52..6b65c343f 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/internal/services/PathMapService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/internal/services/PathMapService.java
@@ -308,7 +308,7 @@ public class PathMapService extends AbstractService implements IPathMapService {
IPeer peer = context instanceof IPeer ? (IPeer)context : null;
if (peer == null && context instanceof IPeerNode) peer = ((IPeerNode)context).getPeer();
- if (peer == null && context instanceof IPeerNodeProvider && ((IPeerNodeProvider)context).getPeerModel() != null) peer = ((IPeerNodeProvider)context).getPeerModel().getPeer();
+ if (peer == null && context instanceof IPeerNodeProvider && ((IPeerNodeProvider)context).getPeerNode() != null) peer = ((IPeerNodeProvider)context).getPeerNode().getPeer();
if (peer != null) {
final IChannel channel = Tcf.getChannelManager().getChannel(peer);
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerNodeProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerNodeProvider.java
index 82838e8d5..3a8e1535f 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerNodeProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerNodeProvider.java
@@ -13,14 +13,14 @@ import org.eclipse.core.runtime.IAdaptable;
/**
* Interface to be implemented by nodes providing access to an peer
- * model object instance without being a peer model object itself.
+ * node object instance without being a peer node object itself.
*/
public interface IPeerNodeProvider extends IAdaptable {
/**
- * Returns the associated peer model object.
+ * Returns the associated peer node object.
*
- * @return The peer model object instance or <code>null</code>.
+ * @return The peer node object instance or <code>null</code>.
*/
- public IPeerNode getPeerModel();
+ public IPeerNode getPeerNode();
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/adapters/AdapterFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/adapters/AdapterFactory.java
index fd5cf3f27..a3aa4337a 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/adapters/AdapterFactory.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/adapters/AdapterFactory.java
@@ -96,7 +96,7 @@ public class AdapterFactory implements IAdapterFactory {
Runnable runnable = new Runnable() {
@Override
public void run() {
- node.set(provider.getPeerModel());
+ node.set(provider.getPeerNode());
}
};
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/adapters/PeerPersistableURIProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/adapters/PeerPersistableURIProvider.java
index 2ecb42a3f..b8194c89d 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/adapters/PeerPersistableURIProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/adapters/PeerPersistableURIProvider.java
@@ -43,7 +43,7 @@ public class PeerPersistableURIProvider extends ModelNodePersistableURIProvider
peer = ((IPeerNode)context).getPeer();
}
else if (context instanceof IPeerNodeProvider) {
- peer = ((IPeerNodeProvider)context).getPeerModel().getPeer();
+ peer = ((IPeerNodeProvider)context).getPeerNode().getPeer();
}
return peer;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nodes/PeerNode.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nodes/PeerNode.java
index fc5a38dc4..4484e34bb 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nodes/PeerNode.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nodes/PeerNode.java
@@ -28,13 +28,14 @@ import org.eclipse.tcf.te.runtime.utils.StatusHelper;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNode;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNodeProperties;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNodeProvider;
import org.eclipse.tcf.te.tcf.locator.interfaces.services.IStepperServiceOperations;
/**
* Default peer model implementation.
*/
-public class PeerNode extends ContainerModelNode implements IPeerNode {
+public class PeerNode extends ContainerModelNode implements IPeerNode, IPeerNodeProvider {
// Reference to the parent locator model
private final IPeerModel model;
// Reference to the peer id (cached for performance optimization)
@@ -75,6 +76,14 @@ public class PeerNode extends ContainerModelNode implements IPeerNode {
}
/* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNodeProvider#getPeerModel()
+ */
+ @Override
+ public IPeerNode getPeerNode() {
+ return this;
+ }
+
+ /* (non-Javadoc)
* @see org.eclipse.tcf.te.runtime.properties.PropertiesContainer#checkThreadAccess()
*/
@Override
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/persistence/GsonPeerPersistenceDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/persistence/GsonPeerPersistenceDelegate.java
index f88212d0b..7c7858ca3 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/persistence/GsonPeerPersistenceDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/persistence/GsonPeerPersistenceDelegate.java
@@ -126,7 +126,7 @@ public class GsonPeerPersistenceDelegate extends GsonMapPersistenceDelegate {
peer = ((IPeerNode)context).getPeer();
}
else if (context instanceof IPeerNodeProvider) {
- peer = ((IPeerNodeProvider)context).getPeerModel().getPeer();
+ peer = ((IPeerNodeProvider)context).getPeerNode().getPeer();
}
return peer;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/nodes/ProcessContextNode.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/nodes/ProcessContextNode.java
index 2bf003277..477b21f47 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/nodes/ProcessContextNode.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/nodes/ProcessContextNode.java
@@ -159,7 +159,7 @@ public class ProcessContextNode extends ContainerModelNode implements IProcessCo
* @see org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNodeProvider#getPeerModel()
*/
@Override
- public IPeerNode getPeerModel() {
+ public IPeerNode getPeerNode() {
return (IPeerNode)getAdapter(IPeerNode.class);
}
@@ -230,7 +230,7 @@ public class ProcessContextNode extends ContainerModelNode implements IProcessCo
}
if (IPeerNode.class.isAssignableFrom(adapter)) {
IModel model = getParent(IModel.class);
- if (model instanceof IPeerNodeProvider) return ((IPeerNodeProvider)model).getPeerModel();
+ if (model instanceof IPeerNodeProvider) return ((IPeerNodeProvider)model).getPeerNode();
}
if (IAsyncRefreshableCtx.class.isAssignableFrom(adapter)) {
return refreshableCtxAdapter;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/runtime/RuntimeModel.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/runtime/RuntimeModel.java
index a36cf47e3..71b0a950e 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/runtime/RuntimeModel.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/runtime/RuntimeModel.java
@@ -183,7 +183,7 @@ public final class RuntimeModel extends ContainerModelNode implements IRuntimeMo
* @see org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNodeProvider#getPeerModel()
*/
@Override
- public IPeerNode getPeerModel() {
+ public IPeerNode getPeerNode() {
Assert.isTrue(checkThreadAccess(), "Illegal Thread Access"); //$NON-NLS-1$
return peerNode;
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/runtime/services/RuntimeModelChannelService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/runtime/services/RuntimeModelChannelService.java
index 14f2887e0..0ad92922e 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/runtime/services/RuntimeModelChannelService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/runtime/services/RuntimeModelChannelService.java
@@ -67,7 +67,7 @@ public class RuntimeModelChannelService extends AbstractModelService<IRuntimeMod
}
// Get the peer model node
- IPeerNode node = getModel().getPeerModel();
+ IPeerNode node = getModel().getPeerNode();
if (node != null) {
// Open a new channel to the remote peer
Tcf.getChannelManager().openChannel(node.getPeer(), null, new IChannelManager.DoneOpenChannel() {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.properties
index 18b10e9d6..89c79ff8c 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.properties
@@ -55,9 +55,9 @@ singlethreadfilter.name = Single Thread Filter
commonFilter.singlethread.name = Single Thread Filter
-propertyTab.general.label = Basic
+propertyTab.general.label = General
propertyTab.context.label = Context
-propertyTab.advanced.label = Properties
+propertyTab.properties.label = Properties
command.refresh.label=Refresh
command.refresh.tooltip=Refresh the selected node
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.xml
index 0651bcd21..ee6fc9559 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.xml
@@ -778,20 +778,17 @@
<propertyTab
category="org.eclipse.tcf.te"
id="org.eclipse.tcf.te.tcf.processes.ui.propertytab.general"
- label="%propertyTab.general.label">
- </propertyTab>
+ label="%propertyTab.general.label"/>
<propertyTab
afterTab="org.eclipse.tcf.te.tcf.processes.ui.propertytab.general"
category="org.eclipse.tcf.te"
id="org.eclipse.tcf.te.tcf.processes.ui.propertytab.context"
- label="%propertyTab.context.label">
- </propertyTab>
+ label="%propertyTab.context.label"/>
<propertyTab
afterTab="org.eclipse.tcf.te.tcf.processes.ui.propertytab.context"
category="org.eclipse.tcf.te"
- id="org.eclipse.tcf.te.tcf.processes.ui.propertytab.advanced"
- label="%propertyTab.advanced.label">
- </propertyTab>
+ id="org.eclipse.tcf.te.tcf.processes.ui.propertytab.properties"
+ label="%propertyTab.properties.label"/>
</propertyTabs>
</extension>
@@ -801,76 +798,48 @@
class="org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed.BasicInformationSection"
enablesFor="1"
id="org.eclipse.tcf.te.tcf.processes.ui.propertysection.general.basic"
- tab="org.eclipse.tcf.te.tcf.processes.ui.propertytab.general">
- <input type="org.eclipse.tcf.te.tcf.processes.core.model.interfaces.IProcessContextNode"/>
- </propertySection>
+ filter="org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed.ProcessContextFilter"
+ tab="org.eclipse.tcf.te.tcf.processes.ui.propertytab.general"/>
<propertySection
afterSection="org.eclipse.tcf.te.tcf.processes.ui.propertysection.general.basic"
class="org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed.IDSection"
enablesFor="1"
id="org.eclipse.tcf.te.tcf.processes.ui.propertysection.general.id"
- tab="org.eclipse.tcf.te.tcf.processes.ui.propertytab.general">
- <input type="org.eclipse.tcf.te.tcf.processes.core.model.interfaces.IProcessContextNode"/>
- </propertySection>
+ filter="org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed.ProcessContextFilter"
+ tab="org.eclipse.tcf.te.tcf.processes.ui.propertytab.general"/>
<propertySection
class="org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed.BasicContextSection"
enablesFor="1"
id="org.eclipse.tcf.te.tcf.processes.ui.propertysection.context.basicContext"
- tab="org.eclipse.tcf.te.tcf.processes.ui.propertytab.context">
- <input type="org.eclipse.tcf.te.tcf.processes.core.model.interfaces.IProcessContextNode"/>
- </propertySection>
+ filter="org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed.ProcessContextFilter"
+ tab="org.eclipse.tcf.te.tcf.processes.ui.propertytab.context"/>
<propertySection
afterSection="org.eclipse.tcf.te.tcf.processes.ui.propertysection.context.basicContext"
class="org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed.ContextIDSection"
enablesFor="1"
id="org.eclipse.tcf.te.tcf.processes.ui.propertysection.context.contextId"
- tab="org.eclipse.tcf.te.tcf.processes.ui.propertytab.context">
- <input type="org.eclipse.tcf.te.tcf.processes.core.model.interfaces.IProcessContextNode"/>
- </propertySection>
+ filter="org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed.ProcessContextFilter"
+ tab="org.eclipse.tcf.te.tcf.processes.ui.propertytab.context"/>
<propertySection
afterSection="org.eclipse.tcf.te.tcf.processes.ui.propertysection.context.contextId"
class="org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed.MemorySection"
enablesFor="1"
id="org.eclipse.tcf.te.tcf.processes.ui.propertysection.context.memory"
- tab="org.eclipse.tcf.te.tcf.processes.ui.propertytab.context">
- <input type="org.eclipse.tcf.te.tcf.processes.core.model.interfaces.IProcessContextNode"/>
- </propertySection>
+ filter="org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed.ProcessContextFilter"
+ tab="org.eclipse.tcf.te.tcf.processes.ui.propertytab.context"/>
<propertySection
- class="org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed.AdvancedPropertiesSection"
+ class="org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed.ProcessNodePropertiesSection"
enablesFor="1"
id="org.eclipse.tcf.te.tcf.processes.ui.propertysection.advanced"
- tab="org.eclipse.tcf.te.tcf.processes.ui.propertytab.advanced">
- <input type="org.eclipse.tcf.te.tcf.processes.core.model.interfaces.IProcessContextNode"/>
- </propertySection>
+ filter="org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed.ProcessPropertiesFilter"
+ tab="org.eclipse.tcf.te.tcf.processes.ui.propertytab.properties"/>
+ <propertySection
+ class="org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed.SystemMonitorContextPropertiesSection"
+ enablesFor="1"
+ id="org.eclipse.tcf.te.tcf.processes.ui.propertysection.advanced"
+ filter="org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed.ProcessPropertiesFilter"
+ tab="org.eclipse.tcf.te.tcf.processes.ui.propertytab.properties"/>
</propertySections>
</extension>
-
-<!-- Property page contributions -->
- <extension point="org.eclipse.ui.propertyPages">
- <page
- class="org.eclipse.tcf.te.tcf.processes.ui.internal.properties.AdvancedPropertiesPage"
- id="org.eclipse.tcf.te.tcf.processes.ui.pages.advanced"
- name="%page.properties.name">
- <enabledWhen>
- <instanceof value="org.eclipse.tcf.te.tcf.processes.core.model.interfaces.IProcessContextNode"/>
- </enabledWhen>
- </page>
- <page
- class="org.eclipse.tcf.te.tcf.processes.ui.internal.properties.ContextPage"
- id="org.eclipse.tcf.te.tcf.processes.ui.pages.context"
- name="%page.context.name">
- <enabledWhen>
- <instanceof value="org.eclipse.tcf.te.tcf.processes.core.model.interfaces.IProcessContextNode"/>
- </enabledWhen>
- </page>
- <page
- class="org.eclipse.tcf.te.tcf.processes.ui.internal.properties.GeneralInformationPage"
- id="org.eclipse.tcf.te.tcf.processes.ui.pages.basic"
- name="%page.basic.name">
- <enabledWhen>
- <instanceof value="org.eclipse.tcf.te.tcf.processes.core.model.interfaces.IProcessContextNode"/>
- </enabledWhen>
- </page>
- </extension>
-
+
</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/adapters/AdapterFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/adapters/AdapterFactory.java
index b4c6ca5b7..912d8faf9 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/adapters/AdapterFactory.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/adapters/AdapterFactory.java
@@ -58,7 +58,7 @@ public class AdapterFactory implements IAdapterFactory {
Runnable runnable = new Runnable() {
@Override
public void run() {
- node.set(((IRuntimeModel)adaptableObject).getPeerModel());
+ node.set(((IRuntimeModel)adaptableObject).getPeerNode());
}
};
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/properties/AdvancedPropertiesPage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/properties/AdvancedPropertiesPage.java
deleted file mode 100644
index b065c0126..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/properties/AdvancedPropertiesPage.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.tcf.processes.ui.internal.properties;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.tcf.protocol.Protocol;
-import org.eclipse.tcf.te.tcf.processes.core.model.interfaces.IProcessContextNode;
-import org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed.MapContentProvider;
-import org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed.MapEntryLabelProvider;
-import org.eclipse.tcf.te.tcf.processes.ui.nls.Messages;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-/**
- * The property page to display the advanced properties of a process context.
- */
-public class AdvancedPropertiesPage extends PropertyPage {
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
- */
- @Override
- protected Control createContents(Composite parent) {
- IAdaptable element = getElement();
- Assert.isTrue(element instanceof IProcessContextNode);
-
- final IProcessContextNode node = (IProcessContextNode) element;
- final Map<String, Object> props = new HashMap<String, Object>();
-
- Runnable runnable = new Runnable() {
- @Override
- public void run() {
- props.putAll(node.getSysMonitorContext().getProperties());
- }
- };
- Assert.isTrue(!Protocol.isDispatchThread());
- Protocol.invokeAndWait(runnable);
-
- Composite page = new Composite(parent, SWT.NONE);
- FillLayout layout = new FillLayout();
- layout.marginHeight = 10;
- layout.marginWidth = 10;
- page.setLayout(layout);
-
- TableViewer viewer = new TableViewer(page, SWT.FULL_SELECTION | SWT.MULTI | SWT.BORDER);
- Table table = viewer.getTable();
- TableColumn column = new TableColumn(table, SWT.LEFT);
- column.setText(Messages.AdvancedPropertiesSection_Name);
- column.setWidth(100);
- column = new TableColumn(table, SWT.LEFT);
- column.setText(Messages.AdvancedPropertiesSection_Value);
- column.setWidth(150);
- table.setHeaderVisible(true);
- table.setLinesVisible(true);
- viewer.setContentProvider(new MapContentProvider());
- viewer.setLabelProvider(new MapEntryLabelProvider());
- viewer.setInput(props);
-
- return page;
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/properties/ContextPage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/properties/ContextPage.java
deleted file mode 100644
index cdc445cb9..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/properties/ContextPage.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.tcf.processes.ui.internal.properties;
-
-import java.util.concurrent.atomic.AtomicReference;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.tcf.protocol.Protocol;
-import org.eclipse.tcf.services.ISysMonitor;
-import org.eclipse.tcf.services.ISysMonitor.SysMonitorContext;
-import org.eclipse.tcf.te.runtime.services.ServiceManager;
-import org.eclipse.tcf.te.runtime.services.interfaces.IUIService;
-import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNode;
-import org.eclipse.tcf.te.tcf.processes.core.model.interfaces.IProcessContextNode;
-import org.eclipse.tcf.te.tcf.processes.ui.interfaces.IProcessMonitorUIDelegate;
-import org.eclipse.tcf.te.tcf.processes.ui.nls.Messages;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-/**
- * The property page to display the context IDs of a process.
- */
-public class ContextPage extends PropertyPage {
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
- */
- @Override
- protected Control createContents(Composite parent) {
- IAdaptable element = getElement();
- Assert.isTrue(element instanceof IProcessContextNode);
-
- final IProcessContextNode node = (IProcessContextNode) element;
- Composite page = new Composite(parent, SWT.NONE);
- GridLayout gridLayout = new GridLayout(2, false);
- page.setLayout(gridLayout);
-
- final AtomicReference<ISysMonitor.SysMonitorContext> ctx = new AtomicReference<ISysMonitor.SysMonitorContext>();
- Runnable runnable = new Runnable() {
- @Override
- public void run() {
- ctx.set(node.getSysMonitorContext());
- }
- };
- Assert.isTrue(!Protocol.isDispatchThread());
- Protocol.invokeAndWait(runnable);
-
- IPeerNode peerNode = (IPeerNode)node.getAdapter(IPeerNode.class);
- IUIService service = peerNode != null ? ServiceManager.getInstance().getService(peerNode, IUIService.class) : null;
- IProcessMonitorUIDelegate delegate = service != null ? service.getDelegate(peerNode, IProcessMonitorUIDelegate.class) : null;
-
- SysMonitorContext context = ctx.get();
- createField(Messages.ContextPage_File, context == null ? null : context.getFile(), page);
- createField(Messages.ContextPage_WorkHome, context == null ? null : context.getCurrentWorkingDirectory(), page);
- createField(Messages.ContextPage_Root, context == null ? null : context.getRoot(), page);
- createField(Messages.ContextPage_State, context == null ? null : context.getState(), page);
- createField(Messages.ContextPage_Group, context == null ? null : context.getGroupName(), page);
- createSeparator(page);
- createField(Messages.ContextPage_ID, context == null ? null : context.getID(), page);
- createField(Messages.ContextPage_ParentID, context == null ? null : context.getParentID(), page);
- createField(Messages.ContextPage_GroupID, context == null || context.getPGRP() < 0 ? null : Long.valueOf(context.getPGRP()), page);
- String label = Messages.getStringDelegated(peerNode, "ContextPage_PID"); //$NON-NLS-1$
- Long v = context == null || context.getPID() < 0 ? null : Long.valueOf(context.getPID());
- String value = delegate != null && v != null ? delegate.getText(node, "PID", v.toString()) : null; //$NON-NLS-1$
- createField(label != null ? label : Messages.ContextPage_PID, value != null ? value : v, page);
- label = Messages.getStringDelegated(peerNode, "ContextPage_PPID"); //$NON-NLS-1$
- v = context == null || context.getPPID() < 0 ? null : Long.valueOf(context.getPPID());
- value = delegate != null && v != null ? delegate.getText(node, "PPID", v.toString()) : null; //$NON-NLS-1$
- createField(label != null ? label : Messages.ContextPage_PPID, value != null ? value : v, page);
- createField(Messages.ContextPage_TTYGRPID, context == null || context.getTGID() < 0 ? null : Long.valueOf(context.getTGID()), page);
- createField(Messages.ContextPage_TracerPID, context == null || context.getTracerPID() < 0 ? null : Long.valueOf(context.getTracerPID()), page);
- createField(Messages.ContextPage_UserID, context == null || context.getUID() < 0 ? null : Long.valueOf(context.getUID()), page);
- createField(Messages.ContextPage_UserGRPID, context == null || context.getUGID() < 0 ? null : Long.valueOf(context.getUGID()), page);
- createSeparator(page);
- createField(Messages.ContextPage_Virtual, context == null || context.getVSize() < 0 ? null : Long.valueOf(context.getVSize()), page);
- createField(Messages.ContextPage_Pages, context == null || context.getPSize() < 0 ? null : Long.valueOf(context.getPSize()), page);
- createField(Messages.ContextPage_Resident, context == null || context.getRSS() < 0 ? null : Long.valueOf(context.getRSS()), page);
-
- return page;
- }
- /**
- * Create a horizontal separator between field sections.
- *
- * @param parent
- * The parent composite of the separator.
- */
- protected void createSeparator(Composite parent) {
- Label label = new Label(parent, SWT.SEPARATOR | SWT.SHADOW_ETCHED_IN | SWT.HORIZONTAL);
- GridData data = new GridData(SWT.FILL, SWT.BEGINNING, true, false);
- data.horizontalSpan = 2;
- label.setLayoutData(data);
- }
- /**
- * Create a field displaying the a specific value with a specific label.
- *
- * @param text
- * The label text for the field.
- * @param value
- * The value to be displayed.
- * @param parent
- * The parent composite of the field.
- */
- protected void createField(String text, Object value, Composite parent) {
- Label label = new Label(parent, SWT.NONE);
- label.setText(text);
- GridData data = new GridData();
- data.horizontalAlignment = SWT.LEFT;
- data.verticalAlignment = SWT.TOP;
- label.setLayoutData(data);
- Text txt = new Text(parent, SWT.WRAP | SWT.READ_ONLY);
- data = new GridData();
- data.verticalAlignment = SWT.TOP;
- data.widthHint = 300;
- data.grabExcessHorizontalSpace = true;
- data.horizontalAlignment = GridData.FILL;
- txt.setLayoutData(data);
- txt.setBackground(txt.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
- txt.setText(value == null ? "" : value.toString()); //$NON-NLS-1$
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/properties/GeneralInformationPage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/properties/GeneralInformationPage.java
deleted file mode 100644
index ecfc3bdbf..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/properties/GeneralInformationPage.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.tcf.processes.ui.internal.properties;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.tcf.protocol.Protocol;
-import org.eclipse.tcf.services.IProcesses;
-import org.eclipse.tcf.services.ISysMonitor;
-import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode;
-import org.eclipse.tcf.te.runtime.services.ServiceManager;
-import org.eclipse.tcf.te.runtime.services.interfaces.IUIService;
-import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNode;
-import org.eclipse.tcf.te.tcf.processes.core.model.interfaces.IProcessContextNode;
-import org.eclipse.tcf.te.tcf.processes.ui.interfaces.IProcessMonitorUIDelegate;
-import org.eclipse.tcf.te.tcf.processes.ui.nls.Messages;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-/**
- * The general information page of a process' properties dialog.
- */
-public class GeneralInformationPage extends PropertyPage {
-
- /* default */ IProcessContextNode node;
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
- */
- @Override
- protected Control createContents(Composite parent) {
- IAdaptable element = getElement();
- Assert.isTrue(element instanceof IProcessContextNode);
-
- node = (IProcessContextNode) element;
-
- IPeerNode peerNode = (IPeerNode)node.getAdapter(IPeerNode.class);
- IUIService service = peerNode != null ? ServiceManager.getInstance().getService(peerNode, IUIService.class) : null;
- IProcessMonitorUIDelegate delegate = service != null ? service.getDelegate(peerNode, IProcessMonitorUIDelegate.class) : null;
-
- final Map<String, Object> props = new HashMap<String, Object>();
-
- Runnable runnable = new Runnable() {
- @Override
- public void run() {
- props.putAll(node.getProcessContext().getProperties());
- props.putAll(node.getSysMonitorContext().getProperties());
- props.put(IModelNode.PROPERTY_TYPE, node.getType().toString());
- }
- };
- Assert.isTrue(!Protocol.isDispatchThread());
- Protocol.invokeAndWait(runnable);
-
- Composite page = new Composite(parent, SWT.NONE);
- GridLayout gridLayout = new GridLayout(2, false);
- page.setLayout(gridLayout);
-
- createField(Messages.GeneralInformationPage_Name, props.get(IProcesses.PROP_NAME), page);
- createField(Messages.GeneralInformationPage_Type, props.get(IModelNode.PROPERTY_TYPE), page);
- createField(Messages.GeneralInformationPage_State, props.get(ISysMonitor.PROP_STATE), page);
- createField(Messages.GeneralInformationPage_User, props.get(ISysMonitor.PROP_USERNAME), page);
- createSeparator(page);
-
- String label = Messages.getStringDelegated(peerNode, "GeneralInformationPage_ProcessID"); //$NON-NLS-1$
- String value = delegate != null ? delegate.getText(node, "PID", (props.get(ISysMonitor.PROP_PID) != null ? props.get(ISysMonitor.PROP_PID).toString() : null)) : null; //$NON-NLS-1$
- createField(label != null ? label : Messages.GeneralInformationPage_ProcessID, value != null ? value : props.get(ISysMonitor.PROP_PID), page);
- label = Messages.getStringDelegated(peerNode, "GeneralInformationPage_ParentPID"); //$NON-NLS-1$
- value = delegate != null ? delegate.getText(node, "PPID", (props.get(ISysMonitor.PROP_PPID) != null ? props.get(ISysMonitor.PROP_PPID).toString() : null)) : null; //$NON-NLS-1$
- createField(label != null ? label : Messages.GeneralInformationPage_ParentPID, props.get(ISysMonitor.PROP_PPID), page);
- label = Messages.getStringDelegated(peerNode, "GeneralInformationPage_InternalPID"); //$NON-NLS-1$
- createField(label != null ? label : Messages.GeneralInformationPage_InternalPID, props.get(IProcesses.PROP_ID), page);
- label = Messages.getStringDelegated(peerNode, "GeneralInformationPage_InternalPPID"); //$NON-NLS-1$
- createField(label != null ? label : Messages.GeneralInformationPage_InternalPPID, props.get(IProcesses.PROP_PARENTID), page);
-
- return page;
- }
- /**
- * Create a horizontal separator between field sections.
- *
- * @param parent
- * The parent composite of the separator.
- */
- protected void createSeparator(Composite parent) {
- Label label = new Label(parent, SWT.SEPARATOR | SWT.SHADOW_ETCHED_IN | SWT.HORIZONTAL);
- GridData data = new GridData(SWT.FILL, SWT.BEGINNING, true, false);
- data.horizontalSpan = 2;
- label.setLayoutData(data);
- }
- /**
- * Create a field displaying the a specific value with a specific label.
- *
- * @param text
- * The label text for the field.
- * @param value
- * The value to be displayed.
- * @param parent
- * The parent composite of the field.
- */
- protected void createField(String text, Object value, Composite parent) {
- Label label = new Label(parent, SWT.NONE);
- label.setText(text);
- GridData data = new GridData();
- data.horizontalAlignment = SWT.LEFT;
- data.verticalAlignment = SWT.TOP;
- label.setLayoutData(data);
- Text txt = new Text(parent, SWT.WRAP | SWT.READ_ONLY);
- data = new GridData();
- data.verticalAlignment = SWT.TOP;
- data.widthHint = 300;
- data.grabExcessHorizontalSpace = true;
- data.horizontalAlignment = GridData.FILL;
- txt.setLayoutData(data);
- txt.setBackground(txt.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
- txt.setText(value == null ? "" : value.toString()); //$NON-NLS-1$
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/AdvancedPropertiesSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/AdvancedPropertiesSection.java
deleted file mode 100644
index 33624a6fb..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/AdvancedPropertiesSection.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed;
-
-import java.util.Map;
-import java.util.concurrent.atomic.AtomicReference;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.tcf.protocol.Protocol;
-import org.eclipse.tcf.te.tcf.processes.core.model.interfaces.IProcessContextNode;
-import org.eclipse.tcf.te.tcf.processes.ui.nls.Messages;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.views.properties.tabbed.AbstractPropertySection;
-import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
-import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
-
-/**
- * The property section to display the advanced properties of a process context.
- */
-public class AdvancedPropertiesSection extends AbstractPropertySection {
- // The properties map.
- /* default */ Map<String, Object> properties;
-
- // The table control to display the properties.
- private TableViewer viewer;
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
- */
- @Override
- public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) {
- super.createControls(parent, aTabbedPropertySheetPage);
- Composite composite = getWidgetFactory().createFlatFormComposite(parent);
- Table table = getWidgetFactory().createTable(composite, SWT.FULL_SELECTION | SWT.MULTI | SWT.BORDER);
- FormData data = new FormData();
- data.left = new FormAttachment(0, 0);
- data.right = new FormAttachment(100, 0);
- data.top = new FormAttachment(0, ITabbedPropertyConstants.VSPACE);
- data.bottom = new FormAttachment(100, -ITabbedPropertyConstants.VSPACE);
- table.setLayoutData(data);
- TableColumn column = new TableColumn(table, SWT.LEFT);
- column.setText(Messages.AdvancedPropertiesSection_Name);
- column.setWidth(100);
- column = new TableColumn(table, SWT.LEFT);
- column.setText(Messages.AdvancedPropertiesSection_Value);
- column.setWidth(150);
- table.setHeaderVisible(true);
- table.setLinesVisible(true);
- viewer = new TableViewer(table);
- viewer.setContentProvider(new MapContentProvider());
- viewer.setLabelProvider(new MapEntryLabelProvider());
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#setInput(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
- */
- @Override
- public void setInput(IWorkbenchPart part, ISelection selection) {
- super.setInput(part, selection);
- Assert.isTrue(selection instanceof IStructuredSelection);
- Object input = ((IStructuredSelection) selection).getFirstElement();
- Assert.isTrue(input instanceof IProcessContextNode);
- final IProcessContextNode node = (IProcessContextNode) input;
- final AtomicReference<Map<String, Object>> props = new AtomicReference<Map<String,Object>>();
- Runnable runnable = new Runnable() {
- @Override
- public void run() {
- props.set(node.getSysMonitorContext().getProperties());
- }
- };
- Assert.isTrue(!Protocol.isDispatchThread());
- Protocol.invokeAndWait(runnable);
-
- properties = props.get();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh()
- */
- @Override
- public void refresh() {
- if (viewer != null) viewer.setInput(properties);
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/MapEntryLabelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/MapEntryLabelProvider.java
deleted file mode 100644
index f020f0fd0..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/MapEntryLabelProvider.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed;
-
-import java.util.Map.Entry;
-
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * The label provider to provide texts and images of map entries.
- */
-public class MapEntryLabelProvider extends LabelProvider implements ITableLabelProvider {
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
- */
- @Override
- public Image getColumnImage(Object element, int columnIndex) {
- return null;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
- */
- @Override
- public String getColumnText(Object element, int columnIndex) {
- if(element instanceof Entry) {
- Entry<?, ?> entry = (Entry<?, ?>) element;
- if(columnIndex == 0) {
- Object key = entry.getKey();
- return key == null ? "" : key.toString(); //$NON-NLS-1$
- }
- Object object = entry.getValue();
- return object == null ? "" : object.toString(); //$NON-NLS-1$
- }
- return null;
- }
-} \ No newline at end of file
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/ProcessContextFilter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/ProcessContextFilter.java
new file mode 100644
index 000000000..6a84e4b01
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/ProcessContextFilter.java
@@ -0,0 +1,33 @@
+/**
+ * ProcessContextFilter.java
+ * Created on Sep 14, 2013
+ *
+ * Copyright (c) 2013 Wind River Systems, Inc.
+ *
+ * The right to copy, distribute, modify, or otherwise make use
+ * of this software may be licensed only pursuant to the terms
+ * of an applicable Wind River license agreement.
+ */
+package org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed;
+
+import org.eclipse.jface.viewers.IFilter;
+import org.eclipse.tcf.te.tcf.processes.core.model.interfaces.IProcessContextNode;
+
+/**
+ * The filter to filter out non process nodes.
+ */
+public class ProcessContextFilter implements IFilter {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
+ */
+ @Override
+ public boolean select(Object toTest) {
+ if (toTest instanceof IProcessContextNode) {
+ return true;
+ }
+ return false;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/ProcessNodePropertiesSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/ProcessNodePropertiesSection.java
new file mode 100644
index 000000000..ca03de51c
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/ProcessNodePropertiesSection.java
@@ -0,0 +1,55 @@
+/**
+ * AbstractMapPropertiesSection.java
+ * Created on Sep 14, 2013
+ *
+ * Copyright (c) 2013 Wind River Systems, Inc.
+ *
+ * The right to copy, distribute, modify, or otherwise make use
+ * of this software may be licensed only pursuant to the terms
+ * of an applicable Wind River license agreement.
+ */
+package org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed;
+
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.tcf.processes.core.model.interfaces.IProcessContextNode;
+import org.eclipse.tcf.te.tcf.processes.ui.nls.Messages;
+import org.eclipse.tcf.te.tcf.ui.tabbed.AbstractMapPropertiesSection;
+
+/**
+ * The property section to display the properties of a module.
+ */
+public class ProcessNodePropertiesSection extends AbstractMapPropertiesSection {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.ui.tabbed.AbstractMapPropertiesSection#getViewerInput()
+ */
+ @Override
+ protected Object getViewerInput() {
+ final AtomicReference<Map<String, Object>> props = new AtomicReference<Map<String,Object>>();
+ Runnable runnable = new Runnable() {
+ @SuppressWarnings("synthetic-access")
+ @Override
+ public void run() {
+ if (provider instanceof IProcessContextNode) {
+ props.set(((IProcessContextNode)provider).getProperties());
+ }
+ }
+ };
+ Assert.isTrue(!Protocol.isDispatchThread());
+ Protocol.invokeAndWait(runnable);
+
+ return props.get();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection#getText()
+ */
+ @Override
+ protected String getText() {
+ return Messages.ProcessNodePropertiesSection_Title;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/ProcessPropertiesFilter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/ProcessPropertiesFilter.java
new file mode 100644
index 000000000..d2d3cc914
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/ProcessPropertiesFilter.java
@@ -0,0 +1,29 @@
+/**
+ * ProcessPropertiesFilter.java
+ * Created on Sep 14, 2013
+ *
+ * Copyright (c) 2013 Wind River Systems, Inc.
+ *
+ * The right to copy, distribute, modify, or otherwise make use
+ * of this software may be licensed only pursuant to the terms
+ * of an applicable Wind River license agreement.
+ */
+package org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed;
+
+import org.eclipse.core.runtime.Platform;
+
+/**
+ * The filter to filter out non process nodes.
+ */
+public class ProcessPropertiesFilter extends ProcessContextFilter {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
+ */
+ @Override
+ public boolean select(Object toTest) {
+ return Platform.inDebugMode() && super.select(toTest);
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/SystemMonitorContextPropertiesSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/SystemMonitorContextPropertiesSection.java
new file mode 100644
index 000000000..6ff122aeb
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/SystemMonitorContextPropertiesSection.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed;
+
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.tcf.processes.core.model.interfaces.IProcessContextNode;
+import org.eclipse.tcf.te.tcf.processes.ui.nls.Messages;
+import org.eclipse.tcf.te.tcf.ui.tabbed.AbstractMapPropertiesSection;
+
+/**
+ * The property section to display the advanced properties of a process context.
+ */
+public class SystemMonitorContextPropertiesSection extends AbstractMapPropertiesSection {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.ui.tabbed.AbstractMapPropertiesSection#getViewerInput()
+ */
+ @Override
+ protected Object getViewerInput() {
+ final AtomicReference<Map<String, Object>> props = new AtomicReference<Map<String,Object>>();
+ Runnable runnable = new Runnable() {
+ @SuppressWarnings("synthetic-access")
+ @Override
+ public void run() {
+ if (provider instanceof IProcessContextNode) {
+ props.set(((IProcessContextNode)provider).getSysMonitorContext().getProperties());
+ }
+ }
+ };
+ Assert.isTrue(!Protocol.isDispatchThread());
+ Protocol.invokeAndWait(runnable);
+
+ return props.get();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.ui.tabbed.BaseTitledSection#getText()
+ */
+ @Override
+ protected String getText() {
+ return Messages.SystemMonitorContextPropertiesSection_Title;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/navigator/runtime/ContentProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/navigator/runtime/ContentProvider.java
index ed42eb963..dbb17ddf9 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/navigator/runtime/ContentProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/navigator/runtime/ContentProvider.java
@@ -195,7 +195,7 @@ public class ContentProvider implements ITreeContentProvider {
Runnable runnable = new Runnable() {
@Override
public void run() {
- parent.set(((IRuntimeModel)element).getPeerModel());
+ parent.set(((IRuntimeModel)element).getPeerNode());
}
};
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/navigator/runtime/LabelProviderDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/navigator/runtime/LabelProviderDelegate.java
index 5ac1825e0..2b40acc54 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/navigator/runtime/LabelProviderDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/navigator/runtime/LabelProviderDelegate.java
@@ -40,7 +40,7 @@ public class LabelProviderDelegate extends AbstractLabelProviderDelegate impleme
Runnable runnable = new Runnable() {
@Override
public void run() {
- node.set(((IRuntimeModel)element).getPeerModel());
+ node.set(((IRuntimeModel)element).getPeerNode());
}
};
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/nls/Messages.java
index 06c8812ab..c1467fba8 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/nls/Messages.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/nls/Messages.java
@@ -72,8 +72,8 @@ public class Messages extends NLS {
public static String AbstractChannelCommandHandler_statusDialog_title;
- public static String AdvancedPropertiesSection_Name;
- public static String AdvancedPropertiesSection_Value;
+ public static String ProcessNodePropertiesSection_Title;
+ public static String SystemMonitorContextPropertiesSection_Title;
public static String BasicContextSection_File;
public static String BasicContextSection_Group;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/nls/Messages.properties
index eee83cccf..9a4e7d230 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/nls/Messages.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/nls/Messages.properties
@@ -26,8 +26,8 @@ ProcessPreferencePage_ValueLabel=Value (seconds)
AbstractChannelCommandHandler_statusDialog_title=Error
-AdvancedPropertiesSection_Name=Name
-AdvancedPropertiesSection_Value=Value
+ProcessNodePropertiesSection_Title=Process Node Properties
+SystemMonitorContextPropertiesSection_Title=Process Context Properties
BasicContextSection_File=File:
BasicContextSection_Group=Group:
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/search/ProcessSearchable.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/search/ProcessSearchable.java
index 964856b11..5a6f8b960 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/search/ProcessSearchable.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/search/ProcessSearchable.java
@@ -63,7 +63,7 @@ public class ProcessSearchable extends CompositeSearchable {
@Override
public void run() {
if (rootElement instanceof IRuntimeModel) {
- node.set(((IRuntimeModel)rootElement).getPeerModel());
+ node.set(((IRuntimeModel)rootElement).getPeerNode());
}
}
};
@@ -91,7 +91,7 @@ public class ProcessSearchable extends CompositeSearchable {
@Override
public void run() {
if (rootElement instanceof IRuntimeModel) {
- node.set(((IRuntimeModel)rootElement).getPeerModel());
+ node.set(((IRuntimeModel)rootElement).getPeerNode());
}
}
};
@@ -123,7 +123,7 @@ public class ProcessSearchable extends CompositeSearchable {
@Override
public void run() {
if (rootElement instanceof IRuntimeModel) {
- node.set(((IRuntimeModel)rootElement).getPeerModel());
+ node.set(((IRuntimeModel)rootElement).getPeerNode());
}
}
};
@@ -152,7 +152,7 @@ public class ProcessSearchable extends CompositeSearchable {
Runnable runnable = new Runnable() {
@Override
public void run() {
- node.set(((IRuntimeModel)rootElement).getPeerModel());
+ node.set(((IRuntimeModel)rootElement).getPeerNode());
}
};
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/plugin.xml
index 5826bab74..57e18d67a 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/plugin.xml
@@ -13,6 +13,12 @@
</factory>
<factory
+ adaptableType="org.eclipse.tcf.protocol.IPeer"
+ class="org.eclipse.tcf.te.tcf.ui.internal.adapters.AdapterFactory">
+ <adapter type="org.eclipse.jface.viewers.ILabelProvider"/>
+ </factory>
+
+ <factory
adaptableType="org.eclipse.tcf.te.ui.views.editor.EditorInput"
class="org.eclipse.tcf.te.tcf.ui.internal.adapters.AdapterFactory">
<adapter type="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNode"/>
@@ -657,21 +663,25 @@
<propertyTabs contributorId="org.eclipse.tcf.te.ui">
<propertyTab
category="org.eclipse.tcf.te"
- id="org.eclipse.tcf.te.ui.views.propertyTab.peer.general"
- label="%propertyTab.general.label">
- </propertyTab>
+ id="org.eclipse.tcf.te.ui.views.propertyTab.locator.general"
+ label="%propertyTab.general.label"/>
</propertyTabs>
</extension>
<extension point="org.eclipse.ui.views.properties.tabbed.propertySections">
<propertySections contributorId="org.eclipse.tcf.te.ui">
<propertySection
- class="org.eclipse.tcf.te.tcf.ui.internal.tabbed.PeerGeneralSection"
+ class="org.eclipse.tcf.te.tcf.ui.internal.tabbed.PeerNodePropertiesSection"
+ enablesFor="1"
+ filter="org.eclipse.tcf.te.tcf.ui.internal.tabbed.PeerNodeSectionFilter"
+ id="org.eclipse.tcf.te.ui.views.propertysections.peerNode.general"
+ tab="org.eclipse.tcf.te.ui.views.propertyTab.locator.general"/>
+ <propertySection
+ class="org.eclipse.tcf.te.tcf.ui.internal.tabbed.PeerPropertiesSection"
enablesFor="1"
- filter="org.eclipse.tcf.te.tcf.ui.internal.tabbed.PeerGeneralSectionFilter"
+ filter="org.eclipse.tcf.te.tcf.ui.internal.tabbed.PeerSectionFilter"
id="org.eclipse.tcf.te.ui.views.propertysections.peer.general"
- tab="org.eclipse.tcf.te.ui.views.propertyTab.peer.general">
- </propertySection>
+ tab="org.eclipse.tcf.te.ui.views.propertyTab.locator.general"/>
</propertySections>
</extension>
</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/adapters/AdapterFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/adapters/AdapterFactory.java
index 4aaea8277..f14d3e1f2 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/adapters/AdapterFactory.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/adapters/AdapterFactory.java
@@ -11,6 +11,7 @@ package org.eclipse.tcf.te.tcf.ui.internal.adapters;
import org.eclipse.core.runtime.IAdapterFactory;
import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.tcf.protocol.IPeer;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNode;
import org.eclipse.tcf.te.ui.views.editor.EditorInput;
import org.eclipse.tcf.te.ui.views.interfaces.IEditorSaveAsAdapter;
@@ -41,6 +42,12 @@ public class AdapterFactory implements IAdapterFactory {
*/
@Override
public Object getAdapter(Object adaptableObject, Class adapterType) {
+ if (adaptableObject instanceof IPeer) {
+ if (ILabelProvider.class.equals(adapterType)) {
+ return labelProvider;
+ }
+ }
+
if (adaptableObject instanceof IPeerNode) {
if (ILabelProvider.class.equals(adapterType)) {
return labelProvider;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerGeneralSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerGeneralSection.java
deleted file mode 100644
index f7d27346d..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerGeneralSection.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.tcf.ui.internal.tabbed;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.ViewerComparator;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNode;
-import org.eclipse.tcf.te.ui.forms.CustomFormToolkit;
-import org.eclipse.tcf.te.ui.tables.TableViewerComparator;
-import org.eclipse.tcf.te.ui.tables.properties.NodePropertiesTableControl;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.views.properties.tabbed.AbstractPropertySection;
-import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
-/**
- * The property section to display the general properties of a peer.
- */
-public class PeerGeneralSection extends AbstractPropertySection {
- // The peer to be displayed.
- private IPeerNode peer;
- // The table control to display the properties.
- private NodePropertiesTableControl tableControl;
- // The form toolkit
- private CustomFormToolkit toolkit;
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#dispose()
- */
- @Override
- public void dispose() {
- if (toolkit != null) { toolkit.dispose(); toolkit = null; }
- super.dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
- */
- @Override
- public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) {
- super.createControls(parent, aTabbedPropertySheetPage);
- Composite composite = getWidgetFactory().createFlatFormComposite(parent);
- composite.setLayout(new GridLayout());
- tableControl = new NodePropertiesTableControl(this.getPart()) {
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.tcf.vtl.ui.datasource.controls.tables.NodePropertiesTableControl#doCreateTableViewerContentProvider(org.eclipse.jface.viewers.TableViewer)
- */
- @Override
- protected IStructuredContentProvider doCreateTableViewerContentProvider(TableViewer viewer) {
- return new PeerGeneralSectionContentProvider(true);
- }
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.tcf.vtl.ui.datasource.controls.tables.properties.NodePropertiesTableControl#doCreateTableViewerLabelProvider(org.eclipse.jface.viewers.TableViewer)
- */
- @Override
- protected ITableLabelProvider doCreateTableViewerLabelProvider(TableViewer viewer) {
- return new PeerGeneralSectionLabelProvider(viewer);
- }
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.tcf.vtl.ui.datasource.controls.tables.NodePropertiesTableControl#doCreateTableViewerComparator(org.eclipse.jface.viewers.TableViewer)
- */
- @Override
- protected ViewerComparator doCreateTableViewerComparator(TableViewer viewer) {
- return new TableViewerComparator(viewer, (ITableLabelProvider)viewer.getLabelProvider());
- }
- };
- toolkit = new CustomFormToolkit(new FormToolkit(parent.getDisplay()));
- tableControl.setupFormPanel(composite, toolkit);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#setInput(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
- */
- @Override
- public void setInput(IWorkbenchPart part, ISelection selection) {
- super.setInput(part, selection);
- Assert.isTrue(selection instanceof IStructuredSelection);
- Object input = ((IStructuredSelection) selection).getFirstElement();
- this.peer = (IPeerNode)Platform.getAdapterManager().getAdapter(input, IPeerNode.class);
- // Assert.isTrue(input instanceof IPeerNode);
- // this.peer = (IPeerNode) input;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh()
- */
- @Override
- public void refresh() {
- if (tableControl != null) {
- tableControl.getViewer().setInput(peer);
- }
- }
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerNodePropertiesSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerNodePropertiesSection.java
new file mode 100644
index 000000000..1c6f4f9f7
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerNodePropertiesSection.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.internal.tabbed;
+
+import org.eclipse.jface.viewers.IContentProvider;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.tcf.te.tcf.ui.nls.Messages;
+import org.eclipse.tcf.te.tcf.ui.tabbed.AbstractMapPropertiesSection;
+/**
+ * The property section to display the general properties of a peerNode.
+ */
+public class PeerNodePropertiesSection extends AbstractMapPropertiesSection {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.ui.tabbed.AbstractMapPropertiesSection#getLabelProvider(org.eclipse.jface.viewers.TableViewer)
+ */
+ @Override
+ protected ILabelProvider getLabelProvider(TableViewer viewer) {
+ return new PeerNodePropertiesSectionLabelProvider(viewer);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.ui.tabbed.AbstractMapPropertiesSection#getContentProvider(org.eclipse.jface.viewers.TableViewer)
+ */
+ @Override
+ protected IContentProvider getContentProvider(TableViewer viewer) {
+ return new PeerNodePropertiesSectionContentProvider(false);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.ui.tabbed.AbstractMapPropertiesSection#getViewerInput()
+ */
+ @Override
+ protected Object getViewerInput() {
+ return getPeerNode(provider);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.ui.tabbed.BaseTitledSection#getText()
+ */
+ @Override
+ protected String getText() {
+ return Messages.PeerNodePropertiesSection_title;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerGeneralSectionContentProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerNodePropertiesSectionContentProvider.java
index 3f26b714b..74b8084ea 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerGeneralSectionContentProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerNodePropertiesSectionContentProvider.java
@@ -36,7 +36,7 @@ import org.eclipse.ui.forms.widgets.Section;
/**
* Peer properties general section table content provider implementation.
*/
-public class PeerGeneralSectionContentProvider implements IStructuredContentProvider {
+public class PeerNodePropertiesSectionContentProvider implements IStructuredContentProvider {
// Flag to control if the content provide may update the parent section title
private final boolean updateParentSectionTitle;
@@ -47,7 +47,7 @@ public class PeerGeneralSectionContentProvider implements IStructuredContentProv
* @param updateParentSectionTitle Specify <code>true</code> to allow the content provider to update
* the parent section title, <code>false</code> if no title update is desired.
*/
- public PeerGeneralSectionContentProvider(boolean updateParentSectionTitle) {
+ public PeerNodePropertiesSectionContentProvider(boolean updateParentSectionTitle) {
this.updateParentSectionTitle = updateParentSectionTitle;
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerGeneralSectionLabelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerNodePropertiesSectionLabelProvider.java
index 129a70491..f673a62ed 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerGeneralSectionLabelProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerNodePropertiesSectionLabelProvider.java
@@ -20,7 +20,7 @@ import org.eclipse.tcf.te.ui.tables.properties.NodePropertiesTableTableNode;
/**
* Peer properties general section table label provider implementation.
*/
-public class PeerGeneralSectionLabelProvider extends LabelProvider implements ITableLabelProvider {
+public class PeerNodePropertiesSectionLabelProvider extends LabelProvider implements ITableLabelProvider {
// Reference to the parent table viewer
private final TableViewer parentViewer;
@@ -29,7 +29,7 @@ public class PeerGeneralSectionLabelProvider extends LabelProvider implements IT
*
* @param viewer The table viewer or <code>null</code>.
*/
- public PeerGeneralSectionLabelProvider(TableViewer viewer) {
+ public PeerNodePropertiesSectionLabelProvider(TableViewer viewer) {
super();
parentViewer = viewer;
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerGeneralSectionFilter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerNodeSectionFilter.java
index 2d0209f2d..36840f164 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerGeneralSectionFilter.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerNodeSectionFilter.java
@@ -1,5 +1,5 @@
/**
- * PeerGeneralSectionFilter.java
+ * PeerNodeSectionFilter.java
* Created on Sep 6, 2012
*
* Copyright (c) 2012 Wind River Systems, Inc.
@@ -14,9 +14,9 @@ import org.eclipse.jface.viewers.IFilter;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNode;
/**
- * Peer model node general section filter implementation.
+ * Peer node general section filter implementation.
*/
-public class PeerGeneralSectionFilter implements IFilter {
+public class PeerNodeSectionFilter implements IFilter {
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerPropertiesSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerPropertiesSection.java
new file mode 100644
index 000000000..f561ec551
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerPropertiesSection.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.ui.internal.tabbed;
+
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.tcf.ui.nls.Messages;
+import org.eclipse.tcf.te.tcf.ui.tabbed.AbstractMapPropertiesSection;
+import org.eclipse.ui.IWorkbenchPart;
+/**
+ * The property section to display the general properties of a peer.
+ */
+public class PeerPropertiesSection extends AbstractMapPropertiesSection {
+
+ IPeer peer = null;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.ui.tabbed.BaseTitledSection#setInput(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+ */
+ @Override
+ public void setInput(IWorkbenchPart part, ISelection selection) {
+ super.setInput(part, selection);
+ Assert.isTrue(selection instanceof IStructuredSelection);
+ Object input = ((IStructuredSelection) selection).getFirstElement();
+ if (input instanceof IPeer) {
+ peer = (IPeer)input;
+ }
+ else {
+ peer = null;
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.ui.tabbed.AbstractMapPropertiesSection#getViewerInput()
+ */
+ @Override
+ protected Object getViewerInput() {
+ final AtomicReference<Map<String,String>> props = new AtomicReference<Map<String,String>>();
+ Runnable runnable = new Runnable() {
+ @Override
+ public void run() {
+ if (peer != null) {
+ props.set(peer.getAttributes());
+ }
+ }
+ };
+ Assert.isTrue(!Protocol.isDispatchThread());
+ Protocol.invokeAndWait(runnable);
+
+ return props.get();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.ui.tabbed.BaseTitledSection#getText()
+ */
+ @Override
+ protected String getText() {
+ return Messages.PeerPropertiesSection_title;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerSectionFilter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerSectionFilter.java
new file mode 100644
index 000000000..f9629bfa4
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/tabbed/PeerSectionFilter.java
@@ -0,0 +1,29 @@
+/**
+ * PeerNodeSectionFilter.java
+ * Created on Sep 6, 2012
+ *
+ * Copyright (c) 2012 Wind River Systems, Inc.
+ *
+ * The right to copy, distribute, modify, or otherwise make use
+ * of this software may be licensed only pursuant to the terms
+ * of an applicable Wind River license agreement.
+ */
+package org.eclipse.tcf.te.tcf.ui.internal.tabbed;
+
+import org.eclipse.jface.viewers.IFilter;
+import org.eclipse.tcf.protocol.IPeer;
+
+/**
+ * Peer general section filter implementation.
+ */
+public class PeerSectionFilter implements IFilter {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
+ */
+ @Override
+ public boolean select(Object element) {
+ return element instanceof IPeer;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/nls/Messages.java
index bde661eba..d8e9fe81d 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/nls/Messages.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/nls/Messages.java
@@ -249,4 +249,10 @@ public class Messages extends NLS {
public static String DefaultContextStatusTrimControl_label;
public static String DefaultContextStatusTrimControl_tooltip;
+
+ public static String AbstractMapPropertiesSection_name_label;
+ public static String AbstractMapPropertiesSection_value_label;
+
+ public static String PeerNodePropertiesSection_title;
+ public static String PeerPropertiesSection_title;
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/nls/Messages.properties
index 7040ca8d6..3570aa448 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/nls/Messages.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/nls/Messages.properties
@@ -209,3 +209,8 @@ PeerImportWizardPage_overwriteDialogToggle_message=Remember my decision
DefaultContextStatusTrimControl_label={0}
DefaultContextStatusTrimControl_tooltip=Most recently used context
+AbstractMapPropertiesSection_name_label=Name
+AbstractMapPropertiesSection_value_label=Value
+
+PeerNodePropertiesSection_title=Configuration Properties
+PeerPropertiesSection_title=Peer Properties
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/tabbed/AbstractMapPropertiesSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/tabbed/AbstractMapPropertiesSection.java
new file mode 100644
index 000000000..d7a6a8c36
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/tabbed/AbstractMapPropertiesSection.java
@@ -0,0 +1,93 @@
+/**
+ * AbstractMapPropertiesSection.java
+ * Created on Sep 14, 2013
+ *
+ * Copyright (c) 2013 Wind River Systems, Inc.
+ *
+ * The right to copy, distribute, modify, or otherwise make use
+ * of this software may be licensed only pursuant to the terms
+ * of an applicable Wind River license agreement.
+ */
+package org.eclipse.tcf.te.tcf.ui.tabbed;
+
+import java.util.Map;
+
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.IContentProvider;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.TableLayout;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.tcf.te.tcf.ui.nls.Messages;
+import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+
+/**
+ * The property section to display properties in a table.
+ */
+public abstract class AbstractMapPropertiesSection extends BaseTitledSection {
+ /* default */ Map<String,Object> properties;
+
+ // The table control to display the properties.
+ protected TableViewer viewer;
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
+ */
+ @Override
+ public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) {
+ super.createControls(parent, aTabbedPropertySheetPage);
+ Table table = getWidgetFactory().createTable(composite, SWT.FULL_SELECTION | SWT.MULTI | SWT.BORDER);
+ FormData data = new FormData();
+ data.left = new FormAttachment(0, 0);
+ data.right = new FormAttachment(100, 0);
+ data.top = new FormAttachment(0, ITabbedPropertyConstants.VSPACE);
+ data.bottom = new FormAttachment(100, -ITabbedPropertyConstants.VSPACE);
+ table.setLayoutData(data);
+ TableColumn column = new TableColumn(table, SWT.LEFT);
+ column.setText(Messages.AbstractMapPropertiesSection_name_label);
+ column = new TableColumn(table, SWT.LEFT);
+ column.setText(Messages.AbstractMapPropertiesSection_value_label);
+ table.setHeaderVisible(true);
+ table.setLinesVisible(true);
+
+ TableLayout tableLayout = new TableLayout();
+ tableLayout.addColumnData(new ColumnWeightData(40, 100, true));
+ tableLayout.addColumnData(new ColumnWeightData(60, 150, true));
+ table.setLayout(tableLayout);
+
+ viewer = new TableViewer(table);
+ viewer.setContentProvider(getContentProvider(viewer));
+ viewer.setLabelProvider(getLabelProvider(viewer));
+ }
+
+ protected IContentProvider getContentProvider(TableViewer viewer) {
+ return new MapContentProvider();
+ }
+
+ protected ILabelProvider getLabelProvider(TableViewer viewer) {
+ return new MapLabelProvider();
+ }
+
+ protected abstract Object getViewerInput();
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh()
+ */
+ @Override
+ public void refresh() {
+ if (viewer != null && !viewer.getTable().isDisposed()) {
+ viewer.setInput(getViewerInput());
+ viewer.refresh();
+ }
+
+ super.refresh();
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/tabbed/BaseTitledSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/tabbed/BaseTitledSection.java
index bf0ba822d..79d088fda 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/tabbed/BaseTitledSection.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/tabbed/BaseTitledSection.java
@@ -11,6 +11,7 @@ package org.eclipse.tcf.te.tcf.ui.tabbed;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
+import java.util.concurrent.atomic.AtomicReference;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IAdaptable;
@@ -27,6 +28,7 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Text;
+import org.eclipse.tcf.protocol.Protocol;
import org.eclipse.tcf.te.core.interfaces.IPropertyChangeProvider;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNode;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNodeProvider;
@@ -72,7 +74,7 @@ public abstract class BaseTitledSection extends AbstractPropertySection implemen
if (provider != null) {
this.provider = provider;
- IPeerNode peerNode = getPeerModel(provider);
+ IPeerNode peerNode = getPeerNode(provider);
this.viewerInput = (IPropertyChangeProvider) peerNode.getAdapter(IPropertyChangeProvider.class);
if (this.viewerInput != null) {
this.viewerInput.addPropertyChangeListener(this);
@@ -85,14 +87,21 @@ public abstract class BaseTitledSection extends AbstractPropertySection implemen
}
/**
- * Get the peer model from the provider.
- * Needs to be overwritten in case of save thread access.
+ * Get the peer node from the provider.
* @param provider
* @return
*/
- protected IPeerNode getPeerModel(IPeerNodeProvider provider) {
+ protected IPeerNode getPeerNode(final IPeerNodeProvider provider) {
Assert.isNotNull(provider);
- return provider.getPeerModel();
+ final AtomicReference<IPeerNode> peerNode = new AtomicReference<IPeerNode>();
+ Protocol.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ peerNode.set(provider.getPeerNode());
+ }
+ });
+
+ return peerNode.get();
}
/**
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/MapContentProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/tabbed/MapContentProvider.java
index 64bc32e93..15f4eab23 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/MapContentProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/tabbed/MapContentProvider.java
@@ -1,50 +1,51 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed;
-
-import java.util.Map;
-
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-
-/**
- * A content provider used to get the properties from a map.
- */
-public class MapContentProvider implements IStructuredContentProvider {
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#dispose()
- */
- @Override
- public void dispose() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- @Override
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
- */
- @Override
- public Object[] getElements(Object inputElement) {
- if(inputElement instanceof Map) {
- Map<?, ?> map = (Map<?, ?>) inputElement;
- return map.entrySet().toArray();
- }
- return new Object[0];
- }
-}
+/**
+ * MapContentProvider.java
+ * Created on Sep 14, 2013
+ *
+ * Copyright (c) 2013 Wind River Systems, Inc.
+ *
+ * The right to copy, distribute, modify, or otherwise make use
+ * of this software may be licensed only pursuant to the terms
+ * of an applicable Wind River license agreement.
+ */
+package org.eclipse.tcf.te.tcf.ui.tabbed;
+
+import java.util.Map;
+
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+
+/**
+ * A content provider used to get the properties from a map.
+ */
+public class MapContentProvider implements IStructuredContentProvider {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+ */
+ @Override
+ public void dispose() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+ */
+ @Override
+ public Object[] getElements(Object inputElement) {
+ if(inputElement instanceof Map) {
+ Map<?, ?> map = (Map<?, ?>) inputElement;
+ return map.entrySet().toArray();
+ }
+ return new Object[0];
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/tabbed/MapLabelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/tabbed/MapLabelProvider.java
new file mode 100644
index 000000000..81964fe46
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/tabbed/MapLabelProvider.java
@@ -0,0 +1,59 @@
+/**
+ * MapLabelProvider.java
+ * Created on Sep 14, 2013
+ *
+ * Copyright (c) 2013 Wind River Systems, Inc.
+ *
+ * The right to copy, distribute, modify, or otherwise make use
+ * of this software may be licensed only pursuant to the terms
+ * of an applicable Wind River license agreement.
+ */
+package org.eclipse.tcf.te.tcf.ui.tabbed;
+
+import java.util.List;
+import java.util.Map.Entry;
+
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * The label provider to provide texts and images of map entries.
+ */
+public class MapLabelProvider extends LabelProvider implements ITableLabelProvider {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
+ */
+ @Override
+ public Image getColumnImage(Object element, int columnIndex) {
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
+ */
+ @Override
+ public String getColumnText(Object element, int columnIndex) {
+ if (element instanceof Entry) {
+ Entry<?, ?> entry = (Entry<?, ?>) element;
+ if (columnIndex == 0) {
+ Object key = entry.getKey();
+ return key == null ? "" : key.toString(); //$NON-NLS-1$
+ }
+ Object object = entry.getValue();
+ if (object instanceof List<?>) {
+ @SuppressWarnings("unchecked")
+ List<Object> list = (List<Object>)object;
+ if (columnIndex < list.size()) {
+ object = list.get(columnIndex);
+ } else {
+ object = null;
+ }
+ }
+
+ return object == null ? "" : object.toString(); //$NON-NLS-1$
+ }
+ return null;
+ }
+} \ No newline at end of file

Back to the top