diff options
author | nitind | 2008-01-17 03:40:17 +0000 |
---|---|---|
committer | nitind | 2008-01-17 03:40:17 +0000 |
commit | 00cb068d8b543bc1f12a87cef8ae6f53f0cbea5d (patch) | |
tree | 580cac522c90b982c21e055d0cf6b570cdba3683 | |
parent | 50477b46dd9e510165fed4e92448a93c9b6b682d (diff) | |
download | webtools.sourceediting-00cb068d8b543bc1f12a87cef8ae6f53f0cbea5d.tar.gz webtools.sourceediting-00cb068d8b543bc1f12a87cef8ae6f53f0cbea5d.tar.xz webtools.sourceediting-00cb068d8b543bc1f12a87cef8ae6f53f0cbea5d.zip |
show model ID and base location
-rw-r--r-- | bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ui/OffsetStatusLineContributionItem.java | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ui/OffsetStatusLineContributionItem.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ui/OffsetStatusLineContributionItem.java index 26996ec3df..ca157d1d58 100644 --- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ui/OffsetStatusLineContributionItem.java +++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ui/OffsetStatusLineContributionItem.java @@ -477,6 +477,18 @@ public class OffsetStatusLineContributionItem extends StatusLineContributionItem IStructuredModel model = StructuredModelManager.getModelManager().getExistingModelForRead(fDocument); if (model != null) { + Text modelIdLabel = new Text(composite, SWT.SINGLE | SWT.READ_ONLY); + gd = new GridData(SWT.FILL, SWT.FILL, true, false); + gd.horizontalSpan = 2; + modelIdLabel.setLayoutData(gd); + modelIdLabel.setText("ID: " + model.getId()); //$NON-NLS-1$ + + Text modelBaseLocationLabel = new Text(composite, SWT.SINGLE | SWT.READ_ONLY); + gd = new GridData(SWT.FILL, SWT.FILL, true, false); + gd.horizontalSpan = 2; + modelBaseLocationLabel.setLayoutData(gd); + modelBaseLocationLabel.setText("Base Location: " + model.getBaseLocation()); //$NON-NLS-1$ + Text modelContentTypeLabel = new Text(composite, SWT.SINGLE | SWT.READ_ONLY); gd = new GridData(SWT.FILL, SWT.FILL, true, false); gd.horizontalSpan = 2; @@ -487,7 +499,7 @@ public class OffsetStatusLineContributionItem extends StatusLineContributionItem gd = new GridData(SWT.FILL, SWT.FILL, true, false); gd.horizontalSpan = 2; modelHandlerContentTypeLabel.setLayoutData(gd); - modelHandlerContentTypeLabel.setText(SSEUIMessages.OffsetStatusLineContributionItem_5 + model.getModelHandler() + " (" + model.getModelHandler().getAssociatedContentTypeId() + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + modelHandlerContentTypeLabel.setText(SSEUIMessages.OffsetStatusLineContributionItem_5 + model.getModelHandler().getAssociatedContentTypeId() + " (" + model.getModelHandler() + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ Label blankRow = new Label(composite, SWT.NONE); gd = new GridData(SWT.FILL, SWT.FILL, true, false); @@ -786,7 +798,7 @@ public class OffsetStatusLineContributionItem extends StatusLineContributionItem } public Object[] getElements(Object inputElement) { - return new Object[]{textSelection}; + return documentRegions.toArray(); } public Object getParent(Object element) { @@ -1103,6 +1115,7 @@ public class OffsetStatusLineContributionItem extends StatusLineContributionItem */ public OffsetStatusLineContributionItem(String id) { super(id); + setToolTipText("Double-click for more information"); } /** @@ -1112,6 +1125,7 @@ public class OffsetStatusLineContributionItem extends StatusLineContributionItem */ public OffsetStatusLineContributionItem(String id, boolean visible, int widthInChars) { super(id, visible, widthInChars); + setToolTipText("Double-click for more information"); } public void setActiveEditor(ITextEditor textEditor) { |