Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2012-05-18 21:28:43 +0000
committerEugene Tarassov2012-05-18 21:28:43 +0000
commite50e66cb2be2115c49b98c081181dc0ad82c0f0e (patch)
treeefba14d0d7339dc2465d97a4964899ab839807f4 /plugins/org.eclipse.tcf.cdt.ui
parent3fa7f3caf2d58a71a84fac4615cd54ac358d1893 (diff)
downloadorg.eclipse.tcf-e50e66cb2be2115c49b98c081181dc0ad82c0f0e.tar.gz
org.eclipse.tcf-e50e66cb2be2115c49b98c081181dc0ad82c0f0e.tar.xz
org.eclipse.tcf-e50e66cb2be2115c49b98c081181dc0ad82c0f0e.zip
TCF Debugger: code cleanup: removed TABs and extra spaces
Diffstat (limited to 'plugins/org.eclipse.tcf.cdt.ui')
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/plugin.xml12
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/ImageCache.java2
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/BreakpointScopeCategory.java46
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/BreakpointScopeCategoryPropertiesHandler.java76
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/BreakpointScopeOrganizer.java44
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/Messages.java2
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/TCFBreakpointScopeExtension.java8
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/TCFBreakpointThreadFilterPage.java6
8 files changed, 97 insertions, 99 deletions
diff --git a/plugins/org.eclipse.tcf.cdt.ui/plugin.xml b/plugins/org.eclipse.tcf.cdt.ui/plugin.xml
index 195c532f6..abaa5d2a1 100644
--- a/plugins/org.eclipse.tcf.cdt.ui/plugin.xml
+++ b/plugins/org.eclipse.tcf.cdt.ui/plugin.xml
@@ -372,7 +372,7 @@
label="%breakpointScope.label">
</breakpointOrganizer>
</extension>
-
+
<extension
point="org.eclipse.ui.menus">
<menuContribution
@@ -394,10 +394,10 @@
</with>
</visibleWhen>
</command>
- </menuContribution>
-
-
+ </menuContribution>
+
+
</extension>
-
-
+
+
</plugin>
diff --git a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/ImageCache.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/ImageCache.java
index 0a9c138e5..7f718610b 100644
--- a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/ImageCache.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/ImageCache.java
@@ -25,7 +25,7 @@ public class ImageCache {
public static final String
IMG_TARGET_TAB = "icons/target_tab.gif";
-
+
public static final String
IMG_BREAKPOINT_SCOPE = "icons/bp_scope.gif";
diff --git a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/BreakpointScopeCategory.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/BreakpointScopeCategory.java
index caecbe313..458876816 100644
--- a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/BreakpointScopeCategory.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/BreakpointScopeCategory.java
@@ -4,7 +4,7 @@
* 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
*******************************************************************************/
@@ -34,17 +34,17 @@ import org.eclipse.ui.model.IWorkbenchAdapter;
/**
* Element which represents a breakpoint scope grouping in Breakpoints view.
* <p>
- * Scope grouping contains both a filter and context IDs string, however
+ * Scope grouping contains both a filter and context IDs string, however
* only one of them can be active on a breakpoint at one time.
- *
+ *
*/
public class BreakpointScopeCategory extends PlatformObject implements IWorkbenchAdapter {
private static Object[] EMPTY_CHILDREN_ARRAY = new Object[0];
-
+
private String fFilter;
private String fContextIds;
-
+
public BreakpointScopeCategory(String filter, String contextIds) {
fFilter = filter;
fContextIds = contextIds;
@@ -53,20 +53,20 @@ public class BreakpointScopeCategory extends PlatformObject implements IWorkbenc
public String getFilter() {
return fFilter;
}
-
+
public String getContextIds() {
return fContextIds;
}
/**
- * Sets the given filter and context strings to all breakpoints which match
+ * Sets the given filter and context strings to all breakpoints which match
* the group's current scope settings.
*/
void setFilter(String filter, String contextIds) {
final List<ICBreakpoint> bps = findCategoryBreakpoints();
fFilter = filter;
fContextIds = contextIds;
-
+
if (bps.isEmpty()) return; // No breakpoints to update
try {
ResourcesPlugin.getWorkspace().run(
@@ -77,7 +77,7 @@ public class BreakpointScopeCategory extends PlatformObject implements IWorkbenc
getScopeExtension(bp).setRawContextIds(fContextIds);
}
}
- },
+ },
new NullProgressMonitor()
);
}
@@ -85,7 +85,7 @@ public class BreakpointScopeCategory extends PlatformObject implements IWorkbenc
Activator.log(e);
}
}
-
+
public String getLabel(Object o) {
if (getFilter() != null) {
return MessageFormat.format(Messages.BreakpointScopeCategory_filter_label, new Object[] { getFilter() });
@@ -94,39 +94,39 @@ public class BreakpointScopeCategory extends PlatformObject implements IWorkbenc
}
return Messages.BreakpointScopeCategory_global_label;
}
-
+
public ImageDescriptor getImageDescriptor(Object object) {
return ImageCache.getImageDescriptor(ImageCache.IMG_BREAKPOINT_SCOPE);
}
-
+
public Object[] getChildren(Object o) {
// Not used
return EMPTY_CHILDREN_ARRAY;
}
-
+
public Object getParent(Object o) {
// Not used
return null;
}
-
+
@Override
public boolean equals(Object obj) {
if (obj instanceof BreakpointScopeCategory) {
- BreakpointScopeCategory other = (BreakpointScopeCategory)obj;
- return ((getFilter() == null && other.getFilter() == null) ||
+ BreakpointScopeCategory other = (BreakpointScopeCategory)obj;
+ return ((getFilter() == null && other.getFilter() == null) ||
(getFilter() != null && getFilter().equals(other.getFilter()))) &&
- ((getContextIds() == null && other.getContextIds() == null) ||
+ ((getContextIds() == null && other.getContextIds() == null) ||
(getContextIds() != null && getContextIds().equals(other.getContextIds())));
}
return false;
}
-
+
@Override
public int hashCode() {
- return (getFilter() != null ? getFilter().hashCode() : 0) +
- (getContextIds() != null ? getContextIds().hashCode() : 0);
+ return (getFilter() != null ? getFilter().hashCode() : 0) +
+ (getContextIds() != null ? getContextIds().hashCode() : 0);
}
-
+
private List<ICBreakpoint> findCategoryBreakpoints() {
List<ICBreakpoint> categoryBreakpoints = new LinkedList<ICBreakpoint>();
IBreakpoint[] breakpoints = DebugPlugin.getDefault().getBreakpointManager().getBreakpoints();
@@ -135,9 +135,9 @@ public class BreakpointScopeCategory extends PlatformObject implements IWorkbenc
if (bp instanceof ICBreakpoint && bpMarker != null) {
String filter = bpMarker.getAttribute(TCFBreakpointsModel.ATTR_CONTEXT_QUERY, (String)null);
String contextIds = bpMarker.getAttribute(TCFBreakpointsModel.ATTR_CONTEXTIDS, (String)null);
- if( ((getFilter() == null && filter == null) ||
+ if( ((getFilter() == null && filter == null) ||
(getFilter() != null && getFilter().equals(filter))) &&
- ((getContextIds() == null && contextIds == null) ||
+ ((getContextIds() == null && contextIds == null) ||
(getContextIds() != null && getContextIds().equals(contextIds))) )
{
categoryBreakpoints.add((ICBreakpoint)bp);
diff --git a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/BreakpointScopeCategoryPropertiesHandler.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/BreakpointScopeCategoryPropertiesHandler.java
index 3b78efe03..67a076bbc 100644
--- a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/BreakpointScopeCategoryPropertiesHandler.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/BreakpointScopeCategoryPropertiesHandler.java
@@ -29,45 +29,45 @@ import org.eclipse.ui.handlers.HandlerUtil;
*/
public class BreakpointScopeCategoryPropertiesHandler extends AbstractHandler {
- /**
- * Constructor for CBreakpointPropertiesAction.
- */
- public BreakpointScopeCategoryPropertiesHandler() {
- super();
- }
+ /**
+ * Constructor for CBreakpointPropertiesAction.
+ */
+ public BreakpointScopeCategoryPropertiesHandler() {
+ super();
+ }
- public Object execute(ExecutionEvent event) throws ExecutionException {
- IWorkbenchPart part = HandlerUtil.getActivePartChecked(event);
- final BreakpointScopeCategory category = getScopeCategory(event.getApplicationContext());
-
- if (part != null && category != null) {
- PreferenceDialog dlg = PreferencesUtil.createPropertyDialogOn(part.getSite().getShell(), category, null, null, null);
- if (dlg != null) {
- dlg.open();
- }
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ IWorkbenchPart part = HandlerUtil.getActivePartChecked(event);
+ final BreakpointScopeCategory category = getScopeCategory(event.getApplicationContext());
+
+ if (part != null && category != null) {
+ PreferenceDialog dlg = PreferencesUtil.createPropertyDialogOn(part.getSite().getShell(), category, null, null, null);
+ if (dlg != null) {
+ dlg.open();
}
-
- return null;
- }
+ }
+
+ return null;
+ }
- @Override
- public void setEnabled(Object evaluationContext) {
- setBaseEnabled( getScopeCategory(evaluationContext) != null );
- }
-
- private BreakpointScopeCategory getScopeCategory(Object evaluationContext) {
- if (evaluationContext instanceof IEvaluationContext) {
- Object s = ((IEvaluationContext) evaluationContext).getVariable(ISources.ACTIVE_MENU_SELECTION_NAME);
- if (s instanceof IStructuredSelection) {
- IStructuredSelection ss = (IStructuredSelection)s;
- if (ss.size() == 1 && ss.getFirstElement() instanceof IBreakpointContainer) {
- IAdaptable category = ((IBreakpointContainer)ss.getFirstElement()).getCategory();
- if (category instanceof BreakpointScopeCategory) {
- return (BreakpointScopeCategory)category;
- }
- }
- }
- }
- return null;
- }
+ @Override
+ public void setEnabled(Object evaluationContext) {
+ setBaseEnabled( getScopeCategory(evaluationContext) != null );
+ }
+
+ private BreakpointScopeCategory getScopeCategory(Object evaluationContext) {
+ if (evaluationContext instanceof IEvaluationContext) {
+ Object s = ((IEvaluationContext) evaluationContext).getVariable(ISources.ACTIVE_MENU_SELECTION_NAME);
+ if (s instanceof IStructuredSelection) {
+ IStructuredSelection ss = (IStructuredSelection)s;
+ if (ss.size() == 1 && ss.getFirstElement() instanceof IBreakpointContainer) {
+ IAdaptable category = ((IBreakpointContainer)ss.getFirstElement()).getCategory();
+ if (category instanceof BreakpointScopeCategory) {
+ return (BreakpointScopeCategory)category;
+ }
+ }
+ }
+ }
+ return null;
+ }
}
diff --git a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/BreakpointScopeOrganizer.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/BreakpointScopeOrganizer.java
index 92b751372..b3b9e8a6a 100644
--- a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/BreakpointScopeOrganizer.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/BreakpointScopeOrganizer.java
@@ -4,7 +4,7 @@
* 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
*******************************************************************************/
@@ -28,9 +28,9 @@ import org.eclipse.tcf.internal.debug.model.ITCFConstants;
import org.eclipse.tcf.internal.debug.model.TCFBreakpointsModel;
/**
- * Breakpoint organizer which groups breakpoints according to their
- * breakpoint scope attributes.
- *
+ * Breakpoint organizer which groups breakpoints according to their
+ * breakpoint scope attributes.
+ *
* @see IBreakpointOrganizerDelegate
*/
@SuppressWarnings("restriction")
@@ -38,15 +38,15 @@ public class BreakpointScopeOrganizer extends AbstractBreakpointOrganizerDelegat
private static IAdaptable[] DEFAULT_CATEGORY_ARRAY = new IAdaptable[] { new BreakpointScopeCategory(null, null) };
- static
+ static
{
- Platform.getAdapterManager().registerAdapters(new BreakpointScopeContainerAdapterFactory(), IBreakpointContainer.class);
+ Platform.getAdapterManager().registerAdapters(new BreakpointScopeContainerAdapterFactory(), IBreakpointContainer.class);
}
-
+
public BreakpointScopeOrganizer() {
DebugPlugin.getDefault().getBreakpointManager().addBreakpointListener(this);
}
-
+
public IAdaptable[] getCategories(IBreakpoint breakpoint) {
IMarker marker = breakpoint.getMarker();
if (marker != null) {
@@ -62,20 +62,20 @@ public class BreakpointScopeOrganizer extends AbstractBreakpointOrganizerDelegat
DebugPlugin.getDefault().getBreakpointManager().removeBreakpointListener(this);
super.dispose();
}
-
+
public void breakpointsAdded(IBreakpoint[] breakpoints) {
}
-
+
public void breakpointsChanged(IBreakpoint[] breakpoints, IMarkerDelta[] deltas) {
- // Using delta's to see which attributes have changed is not reliable.
+ // Using delta's to see which attributes have changed is not reliable.
// Therefore we need to force a full refresh of scope categories whenever
// we get a breakpoints changed notiifcation.
fireCategoryChanged(null);
}
-
+
public void breakpointsRemoved(IBreakpoint[] breakpoints, IMarkerDelta[] deltas) {
}
-
+
@Override
public void addBreakpoint(IBreakpoint breakpoint, IAdaptable category) {
if (category instanceof BreakpointScopeCategory && breakpoint instanceof ICBreakpoint) {
@@ -96,17 +96,17 @@ public class BreakpointScopeOrganizer extends AbstractBreakpointOrganizerDelegat
}
}
}
-
+
@Override
public boolean canAdd(IBreakpoint breakpoint, IAdaptable category) {
return category instanceof BreakpointScopeCategory && breakpoint instanceof ICBreakpoint;
}
-
+
@Override
public boolean canRemove(IBreakpoint breakpoint, IAdaptable category) {
return breakpoint instanceof ICBreakpoint;
}
-
+
@Override
public void removeBreakpoint(IBreakpoint breakpoint, IAdaptable category) {
// Nothing to do, changes handled by add.
@@ -115,19 +115,19 @@ public class BreakpointScopeOrganizer extends AbstractBreakpointOrganizerDelegat
/**
* Adapter factory which returns the breakpoint category for a given breakpoint
- * container element that is shown in Breakpoints view.
+ * container element that is shown in Breakpoints view.
*/
@SuppressWarnings("restriction")
class BreakpointScopeContainerAdapterFactory implements IAdapterFactory {
-
+
private static final Class<?>[] fgAdapterList = new Class[] {
BreakpointScopeCategory.class
};
public Object getAdapter(Object obj, @SuppressWarnings("rawtypes") Class adapterType) {
if ( !(obj instanceof IBreakpointContainer) ) return null;
-
-
+
+
if ( BreakpointScopeCategory.class.equals(adapterType) ) {
IAdaptable category = ((IBreakpointContainer)obj).getCategory();
if (category instanceof BreakpointScopeCategory) {
@@ -136,11 +136,9 @@ class BreakpointScopeContainerAdapterFactory implements IAdapterFactory {
}
return null;
}
-
+
@SuppressWarnings("rawtypes")
public Class[] getAdapterList() {
return fgAdapterList;
}
}
-
-
diff --git a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/Messages.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/Messages.java
index 9f280144b..f7cf3a4a1 100644
--- a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/Messages.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/Messages.java
@@ -27,7 +27,7 @@ public class Messages extends NLS {
public static String BreakpointScopeCategory_filter_label;
public static String BreakpointScopeCategory_contexts_label;
public static String BreakpointScopeCategory_global_label;
-
+
static {
// initialize resource bundle
diff --git a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/TCFBreakpointScopeExtension.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/TCFBreakpointScopeExtension.java
index 895669f7c..a7545d099 100644
--- a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/TCFBreakpointScopeExtension.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/TCFBreakpointScopeExtension.java
@@ -58,7 +58,7 @@ public class TCFBreakpointScopeExtension implements ICBreakpointExtension {
String getRawContextIds() {
return fContextIds;
}
-
+
void setRawContextIds(String contextIDs) {
fContextIds = contextIDs;
if (fBreakpoint != null) {
@@ -67,7 +67,7 @@ public class TCFBreakpointScopeExtension implements ICBreakpointExtension {
public void run(IProgressMonitor monitor) throws CoreException {
final IMarker m = fBreakpoint.getMarker();
if (m == null || !m.exists()) return;
-
+
m.setAttribute(TCFBreakpointsModel.ATTR_CONTEXTIDS, fContextIds);
}
}, null);
@@ -77,7 +77,7 @@ public class TCFBreakpointScopeExtension implements ICBreakpointExtension {
}
}
}
-
+
public void setPropertiesFilter(String properties) {
fProperties = properties;
if (fBreakpoint == null) return;
@@ -98,7 +98,7 @@ public class TCFBreakpointScopeExtension implements ICBreakpointExtension {
public String getPropertiesFilter() {
return fProperties;
}
-
+
public String[] getThreadFilters() {
if (fContextIds != null) {
return fContextIds.split(",\\s*");
diff --git a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/TCFBreakpointThreadFilterPage.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/TCFBreakpointThreadFilterPage.java
index d108550a7..5cb89ab95 100644
--- a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/TCFBreakpointThreadFilterPage.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/TCFBreakpointThreadFilterPage.java
@@ -36,7 +36,7 @@ public class TCFBreakpointThreadFilterPage extends PropertyPage {
fCategoryScopeExtension.setPropertiesFilter(category.getFilter());
fCategoryScopeExtension.setRawContextIds(category.getContextIds());
}
-
+
noDefaultAndApplyButton();
Composite fieldEditorComposite = new Composite(parent, SWT.NONE);
fieldEditorComposite.setLayout( new GridLayout(1, false));
@@ -52,10 +52,10 @@ public class TCFBreakpointThreadFilterPage extends PropertyPage {
protected BreakpointScopeCategory getScopeCategory() {
if (getElement() instanceof BreakpointScopeCategory) {
return (BreakpointScopeCategory)getElement();
- }
+ }
return null;
}
-
+
protected TCFBreakpointScopeExtension getFilterExtension() {
ICBreakpoint bp = getBreakpoint();
if (bp != null) {

Back to the top