Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal')
-rw-r--r--plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/messages.properties103
-rw-r--r--plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFSystemViewRemoteProcessAdapter.java73
2 files changed, 38 insertions, 138 deletions
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/messages.properties b/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/messages.properties
deleted file mode 100644
index 3b48e7409..000000000
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/messages.properties
+++ /dev/null
@@ -1,103 +0,0 @@
-SysMonitor_AllProcesses=All Processes
-SysMonitor_Process=Process
-
-PROCESS_ID_LABEL=Context ID
-PROCESS_PID_LABEL=Process ID
-PROCESS_NAME_LABEL=Executable Name
-PROCESS_CWD_LABEL=CWD
-PROCESS_ROOT_LABEL=FS Root
-PROCESS_UID_LABEL=User ID
-PROCESS_USERNAME_LABEL=Username
-PROCESS_GID_LABEL=Group ID
-PROCESS_GROUPNAME_LABEL=Groupname
-PROCESS_PPID_LABEL=Parent PID
-PROCESS_PGRP_LABEL=Proucess Group
-PROCESS_STATE_LABEL=State
-PROCESS_TRACERPID_LABEL=Tracer PID
-PROCESS_VMSIZE_LABEL=VM Size
-PROCESS_VMRSS_LABEL=VM RSS
-PROCESS_SESSION_LABEL=Session
-PROCESS_TTY_LABEL=TTY
-PROCESS_TGID_LABEL=Task Group ID
-PROCESS_FLAGS_LABEL=Flags
-PROCESS_MINFLT_LABEL=Minor Faults
-PROCESS_CMINFLT_LABEL=Children Minor Faults
-PROCESS_MAJFLT_LABEL=Major Faults
-PROCESS_CMAJFLT_LABEL=Children Major Faults
-PROCESS_UTIME_LABEL=User Time
-PROCESS_STIME_LABEL=System Time
-PROCESS_CUTIME_LABEL=Children User Time
-PROCESS_CSTIME_LABEL=Children System Time
-PROCESS_PC_UTIME_LABEL=% User Time
-PROCESS_PC_STIME_LABEL=% System Time
-PROCESS_PRIORITY_LABEL=Priority
-PROCESS_NICE_LABEL=Nice
-PROCESS_ITREALVALUE_LABEL=Interval Timer
-PROCESS_STARTTIME_LABEL=Start Time
-PROCESS_RLIMIT_LABEL=RSS Limit
-PROCESS_CODESTART_LABEL=Code Start
-PROCESS_CODEEND_LABEL=Code End
-PROCESS_STACKSTART_LABEL=Stack Start
-PROCESS_SIGNALS_LABEL=Pending Signals
-PROCESS_SIGBLOCK_LABEL=Blocked Signals
-PROCESS_SIGIGNORE_LABEL=Ignored Signals
-PROCESS_SIGCATCH_LABEL=Caught Signals
-PROCESS_WCHAN_LABEL=Wait Channel
-PROCESS_NSWAP_LABEL=Swaped Pages
-PROCESS_CNSWAP_LABEL=Children Swapped Pages
-PROCESS_EXITSIGNAL_LABEL=Exit Signal
-PROCESS_PROCESSOR_LABEL=Processor
-PROCESS_RTPRIORITY_LABEL=Real Time Priority
-PROCESS_POLICY_LABEL=Scheduling Policy
-
-PROCESS_ID_TOOLTIP=TCF context ID of the process
-PROCESS_PID_TOOLTIP=The system ID number of the process
-PROCESS_NAME_TOOLTIP=The executable associated with the process
-PROCESS_CWD_TOOLTIP=Current working directory of the process
-PROCESS_ROOT_TOOLTIP=Current file system root of the process
-PROCESS_UID_TOOLTIP=The user ID of the owner of the process
-PROCESS_USERNAME_TOOLTIP=The username of the owner of the process
-PROCESS_GID_TOOLTIP=The group ID of the owner of the process
-PROCESS_GROUPNAME_TOOLTIP=The groupname of the owner of the process
-PROCESS_PPID_TOOLTIP=The process ID of the parent of the process
-PROCESS_PGRP_TOOLTIP=The process group ID
-PROCESS_STATE_TOOLTIP=The state in which the process currently is
-PROCESS_TRACERPID_TOOLTIP=The tracer process ID of the process
-PROCESS_VMSIZE_TOOLTIP=The amount of virtual memory taken up by this process
-PROCESS_VMRSS_TOOLTIP=The amount of virtual memory resident set size of this process (actual RAM taken up by the process)
-PROCESS_SESSION_TOOLTIP=The session ID of the process
-PROCESS_TTY_TOOLTIP=The TTY the process uses
-PROCESS_TGID_TOOLTIP=The task group to which process belongs
-PROCESS_FLAGS_TOOLTIP=The kernel flags word of the process.
-PROCESS_MINFLT_TOOLTIP=The number of minor faults the process has made which have not required loading a memory page from disk.
-PROCESS_CMINFLT_TOOLTIP=The number of minor faults that the process's waited-for children have made.
-PROCESS_MAJFLT_TOOLTIP=The number of major faults the process has made which have required loading a memory page from disk.
-PROCESS_CMAJFLT_TOOLTIP=Children Major Faults
-PROCESS_UTIME_TOOLTIP=User Time
-PROCESS_STIME_TOOLTIP=System Time
-PROCESS_CUTIME_TOOLTIP=Children User Time
-PROCESS_CSTIME_TOOLTIP=Children System Time
-PROCESS_PC_UTIME_TOOLTIP=% User Time
-PROCESS_PC_STIME_TOOLTIP=% System Time
-PROCESS_PRIORITY_TOOLTIP=Priority
-PROCESS_NICE_TOOLTIP=Nice
-PROCESS_ITREALVALUE_TOOLTIP=Interval Timer
-PROCESS_STARTTIME_TOOLTIP=Start Time
-PROCESS_RLIMIT_TOOLTIP=RSS Limit
-PROCESS_CODESTART_TOOLTIP=Code Start
-PROCESS_CODEEND_TOOLTIP=Code End
-PROCESS_STACKSTART_TOOLTIP=Stack Start
-PROCESS_SIGNALS_TOOLTIP=Pending Signals
-PROCESS_SIGBLOCK_TOOLTIP=Blocked Signals
-PROCESS_SIGIGNORE_TOOLTIP=Ignored Signals
-PROCESS_SIGCATCH_TOOLTIP=Caught Signals
-PROCESS_WCHAN_TOOLTIP=Wait Channel
-PROCESS_NSWAP_TOOLTIP=Swaped Pages
-PROCESS_CNSWAP_TOOLTIP=Children Swapped Pages
-PROCESS_EXITSIGNAL_TOOLTIP=Exit Signal
-PROCESS_PROCESSOR_TOOLTIP=Processor
-PROCESS_RTPRIORITY_TOOLTIP=Real Time Priority
-PROCESS_POLICY_TOOLTIP=Scheduling Policy
-
-PROCESS_VMSIZE_VALUE=&1 KB
-PROCESS_VMRSS_VALUE=&1 KB \ No newline at end of file
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFSystemViewRemoteProcessAdapter.java b/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFSystemViewRemoteProcessAdapter.java
index a892a4141..6bdc66bcb 100644
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFSystemViewRemoteProcessAdapter.java
+++ b/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/processes/TCFSystemViewRemoteProcessAdapter.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 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
- *
+ * 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
*******************************************************************************/
@@ -19,6 +19,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.rse.core.model.ISystemMessageObject;
import org.eclipse.rse.core.model.ISystemResourceSet;
import org.eclipse.rse.core.model.SystemMessageObject;
@@ -53,10 +54,10 @@ public class TCFSystemViewRemoteProcessAdapter extends AbstractSystemViewAdapter
private static final Object[] EMPTY_LIST = new Object[0];
private static IPropertyDescriptor[] properties = null;
//private SystemKillProcessAction killProcessAction;
-
- private static final String PROP_PC_UTIME = "PCUTime";
- private static final String PROP_PC_STIME = "PCSTime";
-
+
+ private static final String PROP_PC_UTIME = "PCUTime";
+ private static final String PROP_PC_STIME = "PCSTime";
+
public boolean canDrag(Object element) {
return true;
}
@@ -80,7 +81,7 @@ public class TCFSystemViewRemoteProcessAdapter extends AbstractSystemViewAdapter
killProcessAction = new SystemKillProcessAction(shell);
menu.add(ISystemContextMenuConstants.GROUP_CHANGE, killProcessAction);
*/
-
+
if (copyClipboardAction == null) {
Clipboard clipboard = RSEUIPlugin.getTheSystemRegistryUI().getSystemClipboard();
copyClipboardAction = new SystemCopyToClipboardAction(shell, clipboard);
@@ -92,10 +93,10 @@ public class TCFSystemViewRemoteProcessAdapter extends AbstractSystemViewAdapter
if (element instanceof IRemoteProcess) {
IRemoteProcess process = (IRemoteProcess)element;
return process.getParentRemoteProcessSubSystem();
- }
+ }
return super.getSubSystem(element);
}
-
+
public ImageDescriptor getImageDescriptor(Object element) {
IRemoteProcess process = (IRemoteProcess)element;
TCFProcessResource r = (TCFProcessResource)process.getObject();
@@ -118,7 +119,7 @@ public class TCFSystemViewRemoteProcessAdapter extends AbstractSystemViewAdapter
String text = ((IRemoteProcess)element).getLabel();
return (text == null) ? "" : text; //$NON-NLS-1$
}
-
+
public String getAlternateText(Object element) {
IRemoteProcess process = (IRemoteProcess)element;
String allProperties = process.getAllProperties();
@@ -163,7 +164,7 @@ public class TCFSystemViewRemoteProcessAdapter extends AbstractSystemViewAdapter
TCFProcessAdapter adapter = new TCFProcessAdapter();
children1 = adapter.convertToRemoteProcesses(process.getContext(), process, nodes);
if (children1 == null) children1 = EMPTY_LIST;
-
+
children2 = ss.listAllProcesses(newRpfs, process.getContext(), monitor);
if (children2 == null) children2 = EMPTY_LIST;
}
@@ -182,7 +183,7 @@ public class TCFSystemViewRemoteProcessAdapter extends AbstractSystemViewAdapter
}
protected IPropertyDescriptor[] internalGetPropertyDescriptors() {
- if (properties != null) return properties;
+ if (properties != null) return properties;
List<IPropertyDescriptor> l = new ArrayList<IPropertyDescriptor>();
l.add(createSimplePropertyDescriptor(ISysMonitor.PROP_ID, Messages.PROCESS_ID_LABEL, Messages.PROCESS_ID_TOOLTIP));
@@ -190,7 +191,7 @@ public class TCFSystemViewRemoteProcessAdapter extends AbstractSystemViewAdapter
l.add(createSimplePropertyDescriptor(ISysMonitor.PROP_FILE, Messages.PROCESS_NAME_LABEL, Messages.PROCESS_NAME_TOOLTIP));
l.add(createSimplePropertyDescriptor(ISysMonitor.PROP_CWD, Messages.PROCESS_CWD_LABEL, Messages.PROCESS_CWD_TOOLTIP));
l.add(createSimplePropertyDescriptor(ISysMonitor.PROP_ROOT, Messages.PROCESS_ROOT_LABEL, Messages.PROCESS_ROOT_TOOLTIP));
- l.add(createSimplePropertyDescriptor(ISysMonitor.PROP_STATE, Messages.PROCESS_STATE_LABEL, Messages.PROCESS_STATE_TOOLTIP));
+ l.add(createSimplePropertyDescriptor(ISysMonitor.PROP_STATE, Messages.PROCESS_STATE_LABEL, Messages.PROCESS_STATE_TOOLTIP));
l.add(createSimplePropertyDescriptor(ISysMonitor.PROP_UID, Messages.PROCESS_UID_LABEL, Messages.PROCESS_UID_TOOLTIP));
l.add(createSimplePropertyDescriptor(ISysMonitor.PROP_USERNAME, Messages.PROCESS_USERNAME_LABEL, Messages.PROCESS_USERNAME_TOOLTIP));
l.add(createSimplePropertyDescriptor(ISysMonitor.PROP_UGID, Messages.PROCESS_GID_LABEL, Messages.PROCESS_GID_TOOLTIP));
@@ -233,7 +234,7 @@ public class TCFSystemViewRemoteProcessAdapter extends AbstractSystemViewAdapter
l.add(createSimplePropertyDescriptor(ISysMonitor.PROP_PROCESSOR, Messages.PROCESS_PROCESSOR_LABEL, Messages.PROCESS_PROCESSOR_TOOLTIP));
l.add(createSimplePropertyDescriptor(ISysMonitor.PROP_RTPRIORITY, Messages.PROCESS_RTPRIORITY_LABEL, Messages.PROCESS_RTPRIORITY_TOOLTIP));
l.add(createSimplePropertyDescriptor(ISysMonitor.PROP_POLICY, Messages.PROCESS_POLICY_LABEL, Messages.PROCESS_POLICY_TOOLTIP));
-
+
properties = l.toArray(new IPropertyDescriptor[l.size()]);
return properties;
}
@@ -245,10 +246,10 @@ public class TCFSystemViewRemoteProcessAdapter extends AbstractSystemViewAdapter
protected Object internalGetPropertyValue(Object key) {
return getPropertyValue(key, true);
}
-
+
/**
* Returns the current value for the named property.
- *
+ *
* @param property the name or key of the property as named by its property descriptor
* @param formatted indication of whether to return the value in formatted or raw form
* @return the current value of the given property
@@ -256,14 +257,16 @@ public class TCFSystemViewRemoteProcessAdapter extends AbstractSystemViewAdapter
public Object getPropertyValue(Object property, boolean formatted) {
String name = (String)property;
TCFRemoteProcess process = (TCFRemoteProcess)propertySourceInput;
- Object p = process.getProperties().get((String)property);
-
+ Object p = process.getProperties().get(property);
+
if (formatted) {
if (name.equals(ISysMonitor.PROP_VSIZE)) {
- return sub(Messages.PROCESS_VMSIZE_VALUE, "&1", Long.toString(process.getVmSizeInKB()));
+ return NLS.bind(Messages.PROCESS_VMSIZE_VALUE, Long
+ .toString(process.getVmSizeInKB()));
}
if (name.equals(ISysMonitor.PROP_RSS)) {
- return sub(Messages.PROCESS_VMRSS_VALUE, "&1", Long.toString(process.getVmRSSInKB()));
+ return NLS.bind(Messages.PROCESS_VMRSS_VALUE, Long
+ .toString(process.getVmRSSInKB()));
}
if (name.equals(ISysMonitor.PROP_SIGNALS))return formatBitSet(p);
if (name.equals(ISysMonitor.PROP_SIGBLOCK)) return formatBitSet(p);
@@ -283,12 +286,12 @@ public class TCFSystemViewRemoteProcessAdapter extends AbstractSystemViewAdapter
if (name.equals(PROP_PC_UTIME)) return process.getUserTimePC();
if (name.equals(PROP_PC_STIME)) return process.getSysTimePC();
}
-
+
if (p == null) return null;
if (formatted) return p.toString();
return p;
}
-
+
private String formatTime(Object o) {
if (o instanceof Number) {
BigInteger n = new BigInteger(o.toString());
@@ -315,7 +318,7 @@ public class TCFSystemViewRemoteProcessAdapter extends AbstractSystemViewAdapter
if (o == null) return null;
return o.toString();
}
-
+
private void formatHex(StringBuffer buf, BigInteger n, int cnt) {
BigInteger m[] = n.divideAndRemainder(BigInteger.valueOf(16));
if (cnt < 7 || !m[0].equals(BigInteger.ZERO)) {
@@ -324,7 +327,7 @@ public class TCFSystemViewRemoteProcessAdapter extends AbstractSystemViewAdapter
int d = m[1].intValue();
buf.append((char)(d <= 9 ? '0' + d : 'a' + d - 10));
}
-
+
protected String formatHex(Object o) {
if (o instanceof Number) {
BigInteger n = new BigInteger(o.toString());
@@ -336,7 +339,7 @@ public class TCFSystemViewRemoteProcessAdapter extends AbstractSystemViewAdapter
if (o == null) return null;
return o.toString();
}
-
+
protected String formatBitSet(Object o) {
if (o instanceof Number) {
StringBuffer buf = new StringBuffer();
@@ -358,11 +361,11 @@ public class TCFSystemViewRemoteProcessAdapter extends AbstractSystemViewAdapter
if (o == null) return null;
return o.toString();
}
-
+
protected String formatState(String state) {
return state;
}
-
+
/**
* Return fully qualified name that uniquely identifies this remote object's remote parent within its subsystem
*/
@@ -378,7 +381,7 @@ public class TCFSystemViewRemoteProcessAdapter extends AbstractSystemViewAdapter
* spawned it.
* <p>
* The shell is required in order to set the cursor to a busy state if a remote trip is required.
- *
+ *
* @return an IRemoteProcess object for the parent
*/
public Object getRemoteParent(Object element, IProgressMonitor monitor) throws Exception {
@@ -387,11 +390,11 @@ public class TCFSystemViewRemoteProcessAdapter extends AbstractSystemViewAdapter
/**
* Given a remote object, return the unqualified names of the objects contained in that parent. This is
- * used for testing for uniqueness on a rename operation, for example. Sometimes, it is not
+ * used for testing for uniqueness on a rename operation, for example. Sometimes, it is not
* enough to just enumerate all the objects in the parent for this purpose, because duplicate
- * names are allowed if the types are different, such as on iSeries. In this case return only
+ * names are allowed if the types are different, such as on iSeries. In this case return only
* the names which should be used to do name-uniqueness validation on a rename operation.
- *
+ *
* @return an array of all file and folder names in the parent of the given IRemoteFile object
*/
public String[] getRemoteParentNamesInUse(Object element, IProgressMonitor monitor) throws Exception {
@@ -429,7 +432,7 @@ public class TCFSystemViewRemoteProcessAdapter extends AbstractSystemViewAdapter
return ISystemProcessRemoteTypes.TYPECATEGORY;
}
- /**
+ /**
* Return the subsystem factory id that owns this remote object
* The value must not be translated, so that property pages registered via xml can subset by it.
*/

Back to the top