Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Pazderski2019-05-18 22:03:52 +0000
committerPaul Pazderski2019-06-14 12:39:45 +0000
commit4e5b4450176cf71c5f3620377ec4d7ef39392c0c (patch)
tree2f248a44fd5072a873c92f9fc18f748b3aad39c0 /org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/hover
parenta27187cb1a408caaadf5eca6909bbe03a8b297a4 (diff)
downloadeclipse.platform.debug-4e5b4450176cf71c5f3620377ec4d7ef39392c0c.tar.gz
eclipse.platform.debug-4e5b4450176cf71c5f3620377ec4d7ef39392c0c.tar.xz
eclipse.platform.debug-4e5b4450176cf71c5f3620377ec4d7ef39392c0c.zip
Bug 547304 - [cleanup] Fix wrong space/tab indentationI20190616-1800I20190615-1800I20190614-1800
This change fixes space or mixed tab/space indentations in all Java files. This also includes two or three space indentations and even fix most stray single spaces in indentations. The change includes only whitespace formatting and no code changes. Change-Id: I95f385f1587b72776aee5d955b66e82539dedc3c
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/hover')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/hover/DebugTextHover.java84
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/hover/ExpressionInformationControlCreator.java188
2 files changed, 136 insertions, 136 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/hover/DebugTextHover.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/hover/DebugTextHover.java
index 6cbddd8cd..9ca00b61c 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/hover/DebugTextHover.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/hover/DebugTextHover.java
@@ -82,50 +82,50 @@ public class DebugTextHover implements ITextHover, ITextHoverExtension, ITextHov
* Replaces reserved HTML characters in the given string with
* their escaped equivalents. This is to ensure that variable
* values containing reserved characters are correctly displayed.
- */
- private static String replaceHTMLChars(String variableText) {
- StringBuilder buffer= new StringBuilder(variableText.length());
- char[] characters = variableText.toCharArray();
- for (int i = 0; i < characters.length; i++) {
- char character= characters[i];
- switch (character) {
- case '<':
- buffer.append("&lt;"); //$NON-NLS-1$
- break;
- case '>':
- buffer.append("&gt;"); //$NON-NLS-1$
- break;
- case '&':
- buffer.append("&amp;"); //$NON-NLS-1$
- break;
- case '"':
- buffer.append("&quot;"); //$NON-NLS-1$
- break;
- default:
- buffer.append(character);
- }
- }
- return buffer.toString();
- }
+ */
+ private static String replaceHTMLChars(String variableText) {
+ StringBuilder buffer= new StringBuilder(variableText.length());
+ char[] characters = variableText.toCharArray();
+ for (int i = 0; i < characters.length; i++) {
+ char character= characters[i];
+ switch (character) {
+ case '<':
+ buffer.append("&lt;"); //$NON-NLS-1$
+ break;
+ case '>':
+ buffer.append("&gt;"); //$NON-NLS-1$
+ break;
+ case '&':
+ buffer.append("&amp;"); //$NON-NLS-1$
+ break;
+ case '"':
+ buffer.append("&quot;"); //$NON-NLS-1$
+ break;
+ default:
+ buffer.append(character);
+ }
+ }
+ return buffer.toString();
+ }
- /**
- * Returns the value of this filters preference (on/off) for the given
- * view.
- *
- * @param part
- * @return boolean
- */
- public static boolean getBooleanPreferenceValue(String id, String preference) {
- String compositeKey = id + "." + preference; //$NON-NLS-1$
+ /**
+ * Returns the value of this filters preference (on/off) for the given
+ * view.
+ *
+ * @param part
+ * @return boolean
+ */
+ public static boolean getBooleanPreferenceValue(String id, String preference) {
+ String compositeKey = id + "." + preference; //$NON-NLS-1$
IPreferenceStore store = DebugUIPlugin.getDefault().getPreferenceStore();
- boolean value = false;
- if (store.contains(compositeKey)) {
- value = store.getBoolean(compositeKey);
- } else {
- value = store.getBoolean(preference);
- }
- return value;
- }
+ boolean value = false;
+ if (store.contains(compositeKey)) {
+ value = store.getBoolean(compositeKey);
+ } else {
+ value = store.getBoolean(preference);
+ }
+ return value;
+ }
@Override
public IInformationControlCreator getHoverControlCreator() {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/hover/ExpressionInformationControlCreator.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/hover/ExpressionInformationControlCreator.java
index f9ab8ae56..dc4f6f322 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/hover/ExpressionInformationControlCreator.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/hover/ExpressionInformationControlCreator.java
@@ -94,16 +94,16 @@ public class ExpressionInformationControlCreator implements IInformationControlC
private IVariable fVariable;
private IPresentationContext fContext;
- private TreeModelViewer fViewer;
- private SashForm fSashForm;
- private Composite fDetailPaneComposite;
- private DetailPaneProxy fDetailPane;
- private Tree fTree;
+ private TreeModelViewer fViewer;
+ private SashForm fSashForm;
+ private Composite fDetailPaneComposite;
+ private DetailPaneProxy fDetailPane;
+ private Tree fTree;
/**
- * Creates the content for the root element of the tree viewer in the hover
- */
- private class TreeRoot extends ElementContentProvider {
+ * Creates the content for the root element of the tree viewer in the hover
+ */
+ private class TreeRoot extends ElementContentProvider {
@Override
protected int getChildCount(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
return 1;
@@ -118,7 +118,7 @@ public class ExpressionInformationControlCreator implements IInformationControlC
protected boolean supportsContextId(String id) {
return true;
}
- }
+ }
/**
* Inner class implementing IDetailPaneContainer methods. Handles changes to detail
@@ -219,7 +219,7 @@ public class ExpressionInformationControlCreator implements IInformationControlC
@Override
public void dispose() {
persistSettings(getShell());
- fContext.dispose();
+ fContext.dispose();
super.dispose();
}
@@ -253,61 +253,61 @@ public class ExpressionInformationControlCreator implements IInformationControlC
@Override
protected void createContent(Composite parent) {
- fSashForm = new SashForm(parent, parent.getStyle());
- fSashForm.setOrientation(SWT.VERTICAL);
-
- // update presentation context
- AbstractDebugView view = getViewToEmulate();
- fContext = new PresentationContext(IDebugUIConstants.ID_VARIABLE_VIEW);
- if (view != null) {
- // copy over properties
- IPresentationContext copy = ((TreeModelViewer)view.getViewer()).getPresentationContext();
- String[] properties = copy.getProperties();
- for (int i = 0; i < properties.length; i++) {
+ fSashForm = new SashForm(parent, parent.getStyle());
+ fSashForm.setOrientation(SWT.VERTICAL);
+
+ // update presentation context
+ AbstractDebugView view = getViewToEmulate();
+ fContext = new PresentationContext(IDebugUIConstants.ID_VARIABLE_VIEW);
+ if (view != null) {
+ // copy over properties
+ IPresentationContext copy = ((TreeModelViewer)view.getViewer()).getPresentationContext();
+ String[] properties = copy.getProperties();
+ for (int i = 0; i < properties.length; i++) {
String key = properties[i];
fContext.setProperty(key, copy.getProperty(key));
}
- }
-
- fViewer = new TreeModelViewer(fSashForm, SWT.NO_TRIM | SWT.MULTI | SWT.VIRTUAL, fContext);
- fViewer.setAutoExpandLevel(1);
-
- if (view != null) {
- // copy over filters
- StructuredViewer structuredViewer = (StructuredViewer) view.getViewer();
- if (structuredViewer != null) {
- ViewerFilter[] filters = structuredViewer.getFilters();
- for (int i = 0; i < filters.length; i++) {
- fViewer.addFilter(filters[i]);
- }
- }
- }
-
- fDetailPaneComposite = SWTFactory.createComposite(fSashForm, 1, 1, GridData.FILL_BOTH);
- Layout layout = fDetailPaneComposite.getLayout();
- if (layout instanceof GridLayout) {
+ }
+
+ fViewer = new TreeModelViewer(fSashForm, SWT.NO_TRIM | SWT.MULTI | SWT.VIRTUAL, fContext);
+ fViewer.setAutoExpandLevel(1);
+
+ if (view != null) {
+ // copy over filters
+ StructuredViewer structuredViewer = (StructuredViewer) view.getViewer();
+ if (structuredViewer != null) {
+ ViewerFilter[] filters = structuredViewer.getFilters();
+ for (int i = 0; i < filters.length; i++) {
+ fViewer.addFilter(filters[i]);
+ }
+ }
+ }
+
+ fDetailPaneComposite = SWTFactory.createComposite(fSashForm, 1, 1, GridData.FILL_BOTH);
+ Layout layout = fDetailPaneComposite.getLayout();
+ if (layout instanceof GridLayout) {
GridLayout gl = (GridLayout) layout;
gl.marginHeight = 0;
gl.marginWidth = 0;
}
- fDetailPane = new DetailPaneProxy(new DetailPaneContainer());
- fDetailPane.display(null); // Bring up the default pane so the user doesn't see an empty composite
+ fDetailPane = new DetailPaneProxy(new DetailPaneContainer());
+ fDetailPane.display(null); // Bring up the default pane so the user doesn't see an empty composite
- fTree = fViewer.getTree();
- fTree.addSelectionListener(new SelectionListener() {
- @Override
+ fTree = fViewer.getTree();
+ fTree.addSelectionListener(new SelectionListener() {
+ @Override
public void widgetSelected(SelectionEvent e) {
fDetailPane.display(fViewer.getStructuredSelection());
- }
- @Override
+ }
+ @Override
public void widgetDefaultSelected(SelectionEvent e) {}
- });
+ });
- initSashWeights();
+ initSashWeights();
- // add update listener to auto-select and display details of root expression
- fViewer.addViewerUpdateListener(new IViewerUpdateListener() {
+ // add update listener to auto-select and display details of root expression
+ fViewer.addViewerUpdateListener(new IViewerUpdateListener() {
@Override
public void viewerUpdatesComplete() {
}
@@ -328,55 +328,55 @@ public class ExpressionInformationControlCreator implements IInformationControlC
}
});
- setForegroundColor(getShell().getDisplay().getSystemColor(SWT.COLOR_INFO_FOREGROUND));
- setBackgroundColor(getShell().getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
+ setForegroundColor(getShell().getDisplay().getSystemColor(SWT.COLOR_INFO_FOREGROUND));
+ setBackgroundColor(getShell().getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
}
/**
- * Attempts to find an appropriate view to emulate, this will either be the
- * variables view or the expressions view.
- * @return a view to emulate or <code>null</code>
- */
- private AbstractDebugView getViewToEmulate() {
+ * Attempts to find an appropriate view to emulate, this will either be the
+ * variables view or the expressions view.
+ * @return a view to emulate or <code>null</code>
+ */
+ private AbstractDebugView getViewToEmulate() {
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- AbstractDebugView expressionsView = (AbstractDebugView) page.findView(IDebugUIConstants.ID_EXPRESSION_VIEW);
- if (expressionsView != null && expressionsView.isVisible()) {
- return expressionsView;
- }
- AbstractDebugView variablesView = (AbstractDebugView) page.findView(IDebugUIConstants.ID_VARIABLE_VIEW);
- if (variablesView != null && variablesView.isVisible()) {
- return variablesView;
- }
- if (expressionsView != null) {
- return expressionsView;
- }
- return variablesView;
- }
+ AbstractDebugView expressionsView = (AbstractDebugView) page.findView(IDebugUIConstants.ID_EXPRESSION_VIEW);
+ if (expressionsView != null && expressionsView.isVisible()) {
+ return expressionsView;
+ }
+ AbstractDebugView variablesView = (AbstractDebugView) page.findView(IDebugUIConstants.ID_VARIABLE_VIEW);
+ if (variablesView != null && variablesView.isVisible()) {
+ return variablesView;
+ }
+ if (expressionsView != null) {
+ return expressionsView;
+ }
+ return variablesView;
+ }
/**
- * Initializes the sash form weights from the preference store (using default values if
- * no sash weights were stored previously).
- */
- protected void initSashWeights(){
- IDialogSettings settings = getDialogSettings(false);
- if (settings != null) {
- int tree = getIntSetting(settings, SASH_WEIGHT_TREE);
- if (tree > 0) {
- int details = getIntSetting(settings, SASH_WEIGHT_DETAILS);
- if (details > 0) {
- fSashForm.setWeights(new int[]{tree, details});
- }
- }
- }
- }
-
- @Override
- public void setForegroundColor(Color foreground) {
- super.setForegroundColor(foreground);
- fDetailPaneComposite.setForeground(foreground);
- fTree.setForeground(foreground);
- }
+ * Initializes the sash form weights from the preference store (using default values if
+ * no sash weights were stored previously).
+ */
+ protected void initSashWeights(){
+ IDialogSettings settings = getDialogSettings(false);
+ if (settings != null) {
+ int tree = getIntSetting(settings, SASH_WEIGHT_TREE);
+ if (tree > 0) {
+ int details = getIntSetting(settings, SASH_WEIGHT_DETAILS);
+ if (details > 0) {
+ fSashForm.setWeights(new int[]{tree, details});
+ }
+ }
+ }
+ }
+
+ @Override
+ public void setForegroundColor(Color foreground) {
+ super.setForegroundColor(foreground);
+ fDetailPaneComposite.setForeground(foreground);
+ fTree.setForeground(foreground);
+ }
@Override
public void setBackgroundColor(Color background) {
@@ -400,7 +400,7 @@ public class ExpressionInformationControlCreator implements IInformationControlC
public void setInput(Object input) {
if (input instanceof IVariable) {
fVariable = (IVariable) input;
- fViewer.setInput(new TreeRoot());
+ fViewer.setInput(new TreeRoot());
}
}

Back to the top