Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlena Laskavaia2011-02-23 19:50:07 -0500
committerAlena Laskavaia2011-02-23 19:50:07 -0500
commit598b6fc042eacfacc007746e3e507889c3ac1c02 (patch)
treea992a31bcb7fb9aef9af9a4521bbf47a640d9c6d /codan/org.eclipse.cdt.codan.ui.cxx
parent9164b9a75618a13e6c09bcc8fe16d5a96db9faa1 (diff)
downloadorg.eclipse.cdt-598b6fc042eacfacc007746e3e507889c3ac1c02.tar.gz
org.eclipse.cdt-598b6fc042eacfacc007746e3e507889c3ac1c02.tar.xz
org.eclipse.cdt-598b6fc042eacfacc007746e3e507889c3ac1c02.zip
auto-format code using project formatter
Diffstat (limited to 'codan/org.eclipse.cdt.codan.ui.cxx')
-rw-r--r--codan/org.eclipse.cdt.codan.ui.cxx/src/org/eclipse/cdt/codan/internal/ui/cxx/AbstractCodanCQuickFixProcessor.java20
-rw-r--r--codan/org.eclipse.cdt.codan.ui.cxx/src/org/eclipse/cdt/codan/internal/ui/cxx/Activator.java17
-rw-r--r--codan/org.eclipse.cdt.codan.ui.cxx/src/org/eclipse/cdt/codan/internal/ui/cxx/CodanCReconciler.java6
-rw-r--r--codan/org.eclipse.cdt.codan.ui.cxx/src/org/eclipse/cdt/codan/internal/ui/cxx/Startup.java3
4 files changed, 23 insertions, 23 deletions
diff --git a/codan/org.eclipse.cdt.codan.ui.cxx/src/org/eclipse/cdt/codan/internal/ui/cxx/AbstractCodanCQuickFixProcessor.java b/codan/org.eclipse.cdt.codan.ui.cxx/src/org/eclipse/cdt/codan/internal/ui/cxx/AbstractCodanCQuickFixProcessor.java
index b9b0cce822..456184ac31 100644
--- a/codan/org.eclipse.cdt.codan.ui.cxx/src/org/eclipse/cdt/codan/internal/ui/cxx/AbstractCodanCQuickFixProcessor.java
+++ b/codan/org.eclipse.cdt.codan.ui.cxx/src/org/eclipse/cdt/codan/internal/ui/cxx/AbstractCodanCQuickFixProcessor.java
@@ -25,7 +25,8 @@ import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
/**
- * Abstract class IQuickFixProcessor - not used right now because it does not work
+ * Abstract class IQuickFixProcessor - not used right now because it does not
+ * work
* properly for non hardcoded errors
* <p>
* <strong>EXPERIMENTAL</strong>. This class or interface has been added as part
@@ -53,22 +54,21 @@ public abstract class AbstractCodanCQuickFixProcessor implements IQuickFixProces
* .cdt.ui.text.IInvocationContext,
* org.eclipse.cdt.ui.text.IProblemLocation[])
*/
- public ICCompletionProposal[] getCorrections(IInvocationContext context,
- IProblemLocation[] locations) throws CoreException {
- if (locations==null || locations.length==0) return null;
+ public ICCompletionProposal[] getCorrections(IInvocationContext context, IProblemLocation[] locations) throws CoreException {
+ if (locations == null || locations.length == 0)
+ return null;
IProblemLocation loc = locations[0];
- IPath location= context.getTranslationUnit().getLocation();
+ IPath location = context.getTranslationUnit().getLocation();
IFile astFile = ResourceLookup.selectFileForLocation(location, context.getTranslationUnit().getCProject().getProject());
IMarker[] markers = astFile.findMarkers(loc.getMarkerType(), false, 1);
for (int i = 0; i < markers.length; i++) {
IMarker m = markers[i];
int start = m.getAttribute(IMarker.CHAR_START, -1);
- if (start==loc.getOffset()) {
- String id = m.getAttribute(ICodanProblemMarker.ID,""); //$NON-NLS-1$
+ if (start == loc.getOffset()) {
+ String id = m.getAttribute(ICodanProblemMarker.ID, ""); //$NON-NLS-1$
return getCorrections(context, id, m);
}
}
-
return null;
}
@@ -87,12 +87,12 @@ public abstract class AbstractCodanCQuickFixProcessor implements IQuickFixProces
}
return position;
}
+
/**
* @param context
* @param loc
* @param marker
* @return
*/
- public abstract ICCompletionProposal[] getCorrections(IInvocationContext context,
- String problemId, IMarker marker);
+ public abstract ICCompletionProposal[] getCorrections(IInvocationContext context, String problemId, IMarker marker);
} \ No newline at end of file
diff --git a/codan/org.eclipse.cdt.codan.ui.cxx/src/org/eclipse/cdt/codan/internal/ui/cxx/Activator.java b/codan/org.eclipse.cdt.codan.ui.cxx/src/org/eclipse/cdt/codan/internal/ui/cxx/Activator.java
index 7dcbaaa90f..60851c11b1 100644
--- a/codan/org.eclipse.cdt.codan.ui.cxx/src/org/eclipse/cdt/codan/internal/ui/cxx/Activator.java
+++ b/codan/org.eclipse.cdt.codan.ui.cxx/src/org/eclipse/cdt/codan/internal/ui/cxx/Activator.java
@@ -17,13 +17,11 @@ import org.osgi.framework.BundleContext;
* The activator class controls the plug-in life cycle
*/
public class Activator extends AbstractUIPlugin {
-
// The plug-in ID
public static final String PLUGIN_ID = "org.eclipse.cdt.codan.internal.ui.cxx"; //$NON-NLS-1$
-
// The shared instance
private static Activator plugin;
-
+
/**
* The constructor
*/
@@ -32,7 +30,10 @@ public class Activator extends AbstractUIPlugin {
/*
* (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ *
+ * @see
+ * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
+ * )
*/
public void start(BundleContext context) throws Exception {
super.start(context);
@@ -41,7 +42,10 @@ public class Activator extends AbstractUIPlugin {
/*
* (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ *
+ * @see
+ * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
+ * )
*/
public void stop(BundleContext context) throws Exception {
plugin = null;
@@ -50,11 +54,10 @@ public class Activator extends AbstractUIPlugin {
/**
* Returns the shared instance
- *
+ *
* @return the shared instance
*/
public static Activator getDefault() {
return plugin;
}
-
}
diff --git a/codan/org.eclipse.cdt.codan.ui.cxx/src/org/eclipse/cdt/codan/internal/ui/cxx/CodanCReconciler.java b/codan/org.eclipse.cdt.codan.ui.cxx/src/org/eclipse/cdt/codan/internal/ui/cxx/CodanCReconciler.java
index 6ce024299e..3c44ab1981 100644
--- a/codan/org.eclipse.cdt.codan.ui.cxx/src/org/eclipse/cdt/codan/internal/ui/cxx/CodanCReconciler.java
+++ b/codan/org.eclipse.cdt.codan.ui.cxx/src/org/eclipse/cdt/codan/internal/ui/cxx/CodanCReconciler.java
@@ -75,8 +75,7 @@ public class CodanCReconciler implements ICReconcilingListener {
* .eclipse.cdt.core.dom.ast.IASTTranslationUnit, boolean,
* org.eclipse.core.runtime.IProgressMonitor)
*/
- public void reconciled(IASTTranslationUnit ast, boolean force,
- IProgressMonitor progressMonitor) {
+ public void reconciled(IASTTranslationUnit ast, boolean force, IProgressMonitor progressMonitor) {
if (ast == null)
return;
String filePath = ast.getFilePath();
@@ -88,8 +87,7 @@ public class CodanCReconciler implements ICReconcilingListener {
if (resources != null && resources.length > 0) {
IFile resource = resources[0];
IProject project = resource.getProject();
- IPreferenceStore store = CodanUIActivator.getDefault()
- .getPreferenceStore(project);
+ IPreferenceStore store = CodanUIActivator.getDefault().getPreferenceStore(project);
if (store.getBoolean(PreferenceConstants.P_RUN_IN_EDITOR)) {
reconsiler.reconciledAst(ast, resource, progressMonitor);
}
diff --git a/codan/org.eclipse.cdt.codan.ui.cxx/src/org/eclipse/cdt/codan/internal/ui/cxx/Startup.java b/codan/org.eclipse.cdt.codan.ui.cxx/src/org/eclipse/cdt/codan/internal/ui/cxx/Startup.java
index dd87ec837c..ae0c1bb48e 100644
--- a/codan/org.eclipse.cdt.codan.ui.cxx/src/org/eclipse/cdt/codan/internal/ui/cxx/Startup.java
+++ b/codan/org.eclipse.cdt.codan.ui.cxx/src/org/eclipse/cdt/codan/internal/ui/cxx/Startup.java
@@ -81,8 +81,7 @@ public class Startup implements IStartup {
};
page.addPartListener(partListener);
// check current open editors
- IEditorReference[] editorReferences = page
- .getEditorReferences();
+ IEditorReference[] editorReferences = page.getEditorReferences();
for (int i = 0; i < editorReferences.length; i++) {
IEditorReference ref = editorReferences[i];
partListener.partOpened(ref);

Back to the top