Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2012-09-20 12:51:55 +0000
committerUwe Stieber2012-09-20 12:51:55 +0000
commit00b372d8b8e8c38324911842d9b2f49d4b5308d9 (patch)
tree1384f26ee52c105a63da29e2eaff06bad7e61963
parent60ae1b3e6b455dfb52f2791f355e6b642a39cdfd (diff)
downloadorg.eclipse.tcf-00b372d8b8e8c38324911842d9b2f49d4b5308d9.tar.gz
org.eclipse.tcf-00b372d8b8e8c38324911842d9b2f49d4b5308d9.tar.xz
org.eclipse.tcf-00b372d8b8e8c38324911842d9b2f49d4b5308d9.zip
Bug 390001 - [UI][PathMap] Relabel the path map rules table column header
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TCFPathMapTab.java22
1 files changed, 21 insertions, 1 deletions
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TCFPathMapTab.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TCFPathMapTab.java
index 7a69a079d..798898848 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TCFPathMapTab.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TCFPathMapTab.java
@@ -69,30 +69,41 @@ public class TCFPathMapTab extends AbstractLaunchConfigurationTab {
100,
};
+ private static final String[] column_labels = {
+ "Host Path",
+ "Target Path",
+ "Context Query"
+ };
+
private static final String TAB_ID = "org.eclipse.tcf.launch.pathMapTab";
private ArrayList<PathMapRule> map;
private class FileMapContentProvider implements IStructuredContentProvider {
+ @Override
public Object[] getElements(Object input) {
return map.toArray(new PathMapRule[map.size()]);
}
+ @Override
public void inputChanged(Viewer viewer, Object old_input, Object new_input) {
}
+ @Override
public void dispose() {
}
}
private class FileMapLabelProvider extends LabelProvider implements ITableLabelProvider {
+ @Override
public Image getColumnImage(Object element, int column) {
if (column == 0) return ImageCache.getImage(ImageCache.IMG_ATTRIBUTE);
return null;
}
+ @Override
public String getColumnText(Object element, int column) {
PathMapRule e = (PathMapRule)element;
Object o = e.getProperties().get(column_ids[column]);
@@ -103,10 +114,12 @@ public class TCFPathMapTab extends AbstractLaunchConfigurationTab {
private class FileMapCellModifier implements ICellModifier {
+ @Override
public boolean canModify(Object element, String property) {
return true;
}
+ @Override
public Object getValue(Object element, String property) {
if (element instanceof Item) element = ((Item)element).getData();
PathMapRule a = (PathMapRule)element;
@@ -115,6 +128,7 @@ public class TCFPathMapTab extends AbstractLaunchConfigurationTab {
return o.toString();
}
+ @Override
public void modify(Object element, String property, Object value) {
if (element instanceof Item) element = ((Item)element).getData();
PathMapRule a = (PathMapRule)element;
@@ -127,6 +141,7 @@ public class TCFPathMapTab extends AbstractLaunchConfigurationTab {
private Exception init_error;
+ @Override
public String getName() {
return "Path Map";
}
@@ -141,6 +156,7 @@ public class TCFPathMapTab extends AbstractLaunchConfigurationTab {
return TAB_ID;
}
+ @Override
public void createControl(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout(1, false);
@@ -177,7 +193,7 @@ public class TCFPathMapTab extends AbstractLaunchConfigurationTab {
CellEditor[] editors = new CellEditor[column_ids.length];
for (int i = 0; i < column_ids.length; i++) {
TableColumn c = new TableColumn(table, SWT.NONE, i);
- c.setText(column_ids[i]);
+ c.setText(column_labels[i]);
c.setWidth(column_size[i]);
editors[i] = new TextCellEditor(table);
}
@@ -185,6 +201,7 @@ public class TCFPathMapTab extends AbstractLaunchConfigurationTab {
viewer.setCellModifier(new FileMapCellModifier());
createTableButtons(composite);
viewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ @Override
public void selectionChanged(SelectionChangedEvent event) {
updateLaunchConfigurationDialog();
}
@@ -238,6 +255,7 @@ public class TCFPathMapTab extends AbstractLaunchConfigurationTab {
return Collections.unmodifiableList(l);
}
+ @Override
public void initializeFrom(ILaunchConfiguration config) {
setErrorMessage(null);
setMessage(null);
@@ -254,6 +272,7 @@ public class TCFPathMapTab extends AbstractLaunchConfigurationTab {
}
}
+ @Override
public void performApply(ILaunchConfigurationWorkingCopy config) {
for (PathMapRule m : map) m.getProperties().remove(IPathMap.PROP_ID);
StringBuffer bf = new StringBuffer();
@@ -262,6 +281,7 @@ public class TCFPathMapTab extends AbstractLaunchConfigurationTab {
else config.setAttribute(TCFLaunchDelegate.ATTR_PATH_MAP, bf.toString());
}
+ @Override
public void setDefaults(ILaunchConfigurationWorkingCopy config) {
config.removeAttribute(TCFLaunchDelegate.ATTR_PATH_MAP);
}

Back to the top