Skip to main content
summaryrefslogtreecommitdiffstats
path: root/codan
diff options
context:
space:
mode:
authorAlena Laskavaia2016-01-07 20:34:16 -0500
committerAlena Laskavaia2016-01-08 07:51:04 -0500
commit1b0fe3a41e3aab496a9f54caa6abe947d4452405 (patch)
treee1b7ed8dc4e678bff0a2c8d0547df783b67aaab3 /codan
parentaa4f014a3a5272b876c2fcb81c6c9658e626fd6e (diff)
downloadorg.eclipse.cdt-1b0fe3a41e3aab496a9f54caa6abe947d4452405.tar.gz
org.eclipse.cdt-1b0fe3a41e3aab496a9f54caa6abe947d4452405.tar.xz
org.eclipse.cdt-1b0fe3a41e3aab496a9f54caa6abe947d4452405.zip
Removed deprecated method in codan.core, bumped version to 4.0
Diffstat (limited to 'codan')
-rw-r--r--codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/CommentChecker.java6
-rw-r--r--codan/org.eclipse.cdt.codan.core/META-INF/MANIFEST.MF2
-rw-r--r--codan/org.eclipse.cdt.codan.core/pom.xml2
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractChecker.java6
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractProblemLocation.java28
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IChecker.java9
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IProblemLocationFactory.java22
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanProblemLocation.java16
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/ProblemLocationFactory.java6
9 files changed, 19 insertions, 78 deletions
diff --git a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/CommentChecker.java b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/CommentChecker.java
index c02c716714..2008ab588c 100644
--- a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/CommentChecker.java
+++ b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/CommentChecker.java
@@ -55,9 +55,9 @@ public class CommentChecker extends AbstractIndexAstChecker {
}
}
- @SuppressWarnings("deprecation")
private IProblemLocation getProblemLocation(IASTFileLocation astLocation, int pos) {
IProblemLocationFactory locFactory = getRuntime().getProblemLocationFactory();
- return locFactory.createProblemLocation(getFile(), astLocation.getNodeOffset() + pos, astLocation.getNodeOffset() + pos + 2);
+ int newPosition = astLocation.getNodeOffset() + pos;
+ return locFactory.createProblemLocation(getFile(), newPosition, newPosition + 2, -1);
}
-}
+} \ No newline at end of file
diff --git a/codan/org.eclipse.cdt.codan.core/META-INF/MANIFEST.MF b/codan/org.eclipse.cdt.codan.core/META-INF/MANIFEST.MF
index 04d45c3928..66f295357a 100644
--- a/codan/org.eclipse.cdt.codan.core/META-INF/MANIFEST.MF
+++ b/codan/org.eclipse.cdt.codan.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.cdt.codan.core;singleton:=true
-Bundle-Version: 3.3.0.qualifier
+Bundle-Version: 4.0.0.qualifier
Bundle-Activator: org.eclipse.cdt.codan.core.CodanCorePlugin
Bundle-Vendor: %Bundle-Vendor
Require-Bundle: org.eclipse.core.runtime,
diff --git a/codan/org.eclipse.cdt.codan.core/pom.xml b/codan/org.eclipse.cdt.codan.core/pom.xml
index 3583f3e146..795ef593dc 100644
--- a/codan/org.eclipse.cdt.codan.core/pom.xml
+++ b/codan/org.eclipse.cdt.codan.core/pom.xml
@@ -11,7 +11,7 @@
<relativePath>../../pom.xml</relativePath>
</parent>
- <version>3.3.0-SNAPSHOT</version>
+ <version>4.0.0-SNAPSHOT</version>
<artifactId>org.eclipse.cdt.codan.core</artifactId>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractChecker.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractChecker.java
index fb1068cde0..871611809b 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractChecker.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractChecker.java
@@ -35,12 +35,6 @@ public abstract class AbstractChecker implements IChecker {
public AbstractChecker() {
}
- @Deprecated
- @Override
- public boolean enabledInContext(IResource resource) {
- return false;
- }
-
/**
* Reports a simple problem for given file and line
*
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractProblemLocation.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractProblemLocation.java
index 4916545db9..78f724e890 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractProblemLocation.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractProblemLocation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2012 Alena Laskavaia
+ * Copyright (c) 2009, 2012 Alena Laskavaia
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -15,13 +15,8 @@ import org.eclipse.core.resources.IResource;
/**
* Abstract Implementation of IProblemLocation
- *
+ *
* Clients may extend this class.
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as
- * part of a work in progress. There is no guarantee that this API will
- * work or that it will remain the same.
- * </p>
*/
public abstract class AbstractProblemLocation implements IProblemLocation {
protected IResource file;
@@ -58,10 +53,11 @@ public abstract class AbstractProblemLocation implements IProblemLocation {
this.posEnd = endChar;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.cdt.codan.core.model.IProblemLocation#getData()
+ /**
+ * Gets the extra data for the location. It is checker specific,
+ * for example can be problem backtrace.
+ *
+ * @return data object or null if non set
*/
@Override
public Object getData() {
@@ -69,8 +65,8 @@ public abstract class AbstractProblemLocation implements IProblemLocation {
}
/**
- * Sets extra data for the problem location
- *
+ * Sets extra data for the problem location.
+ *
* @param data
*/
public void setData(Object data) {
@@ -79,7 +75,7 @@ public abstract class AbstractProblemLocation implements IProblemLocation {
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.cdt.codan.core.model.IProblemLocation#getFile()
*/
@Override
@@ -112,7 +108,7 @@ public abstract class AbstractProblemLocation implements IProblemLocation {
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.cdt.codan.core.model.IProblemLocation#getStartPos()
*/
@Override
@@ -122,7 +118,7 @@ public abstract class AbstractProblemLocation implements IProblemLocation {
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.cdt.codan.core.model.IProblemLocation#getEndingChar()
*/
@Override
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IChecker.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IChecker.java
index 5948063274..28cbb92c66 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IChecker.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IChecker.java
@@ -66,15 +66,6 @@ public interface IChecker {
IProblemReporter getProblemReporter();
/**
- * @param resource the resource to run on.
- * @return true if checker should be run on this resource.
- * @deprecated Ignored since 2.0. Replaced by
- * {@link org.eclipse.cdt.codan.internal.core.CheckersRegistry#isCheckerEnabled(IChecker, IResource, CheckerLaunchMode)}
- */
- @Deprecated
- boolean enabledInContext(IResource resource);
-
- /**
* Checker must implement this method to determine if it can run in editor
* "as you type". Checker must be really light weight to run in this mode.
* If it returns true, checker must also implement
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IProblemLocationFactory.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IProblemLocationFactory.java
index 9272258e43..c114ca956d 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IProblemLocationFactory.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IProblemLocationFactory.java
@@ -16,11 +16,6 @@ import org.eclipse.core.resources.IFile;
* Factory interface that allows to create problem locations.
*
* Clients may implement and extend this interface.
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as part
- * of a work in progress. There is no guarantee that this API will work or that
- * it will remain the same.
- * </p>
*/
public interface IProblemLocationFactory {
/**
@@ -37,23 +32,6 @@ public interface IProblemLocationFactory {
/**
* Create and return instance of IProblemLocation
*
- * @param file
- * - file where problem is found
- * @param startChar
- * - start char of the problem in the file, is zero-relative
- * @param endChar
- * - end char of the problem in the file, is zero-relative and
- * exclusive.
- * @return instance of IProblemLocation
- *
- * @deprecated Use {@link #createProblemLocation(IFile, int, int, int)} instead.
- */
- @Deprecated
- public IProblemLocation createProblemLocation(IFile file, int startChar, int endChar);
-
- /**
- * Create and return instance of IProblemLocation
- *
* @param astFile - file where problem is found
* @param startChar - start char of the problem in the file, is
* zero-relative
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanProblemLocation.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanProblemLocation.java
index 2352cea688..c70e786340 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanProblemLocation.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanProblemLocation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2011 Alena Laskavaia
+ * Copyright (c) 2009, 2011 Alena Laskavaia
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -16,7 +16,7 @@ import org.eclipse.core.resources.IResource;
/**
* Codan Problem Location, so far same as abstract class
- *
+ *
*/
public class CodanProblemLocation extends AbstractProblemLocation {
/**
@@ -31,18 +31,6 @@ public class CodanProblemLocation extends AbstractProblemLocation {
}
/**
- * @deprecated use {@link #CodanProblemLocation(IResource, int, int, int)}
- * otherwise no line number will be shown
- * @param file
- * @param startChar
- * @param endChar
- */
- @Deprecated
- public CodanProblemLocation(IFile file, int startChar, int endChar) {
- super(file, startChar, endChar);
- }
-
- /**
* @param file - resource
* @param startChar - start chart, absolute file offset starts with 0
* @param endChar - end char, absolute file offset, exclusive
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/ProblemLocationFactory.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/ProblemLocationFactory.java
index 46fb0904c9..5d9bb7c2a9 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/ProblemLocationFactory.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/ProblemLocationFactory.java
@@ -25,12 +25,6 @@ public class ProblemLocationFactory implements IProblemLocationFactory {
}
@Override
- @Deprecated
- public IProblemLocation createProblemLocation(IFile file, int startChar, int endChar) {
- return new CodanProblemLocation(file, startChar, endChar);
- }
-
- @Override
public IProblemLocation createProblemLocation(IFile file, int startChar, int endChar, int line) {
return new CodanProblemLocation(file, startChar, endChar, line);
}

Back to the top