Avoid dependency on Editor Library and this makes the plugin compatible with NB6.5-6.9 (supposedly, I tried NB6.8&6.9 only)

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7102 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Radim Kubacki
2010-06-18 13:42:53 +00:00
parent 79c6202f5b
commit 6e2dc1255b
5 changed files with 6 additions and 18 deletions

View File

@ -4,7 +4,7 @@
<property name="pmd.jar" value="pmd-4.2.5.jar"/>
<property name="nb.version" value="netbeans65"/>
<property name="VERSION" value="2.2.5"/>
<property name="VERSION" value="2.2.6"/>
<property file="build.ant.properties"/>

View File

@ -1,5 +1,5 @@
Manifest-Version: 1.0
OpenIDE-Module-Specification-Version: 2.2.5
OpenIDE-Module-Specification-Version: 2.2.6
Created-By: Ole-Martin Mørk and Gunnlaugur Þór Briem, Radim Kubacki, Tomasz Slota
OpenIDE-Module: pmd
OpenIDE-Module-Layer: pmd/mf-layer.xml

View File

@ -1,5 +1,5 @@
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=1c5b0dad
nbproject/build-impl.xml.data.CRC32=c7fb167a
nbproject/build-impl.xml.script.CRC32=209b78c0
nbproject/build-impl.xml.stylesheet.CRC32=deb65f65@1.31.1.7

View File

@ -60,15 +60,6 @@
<specification-version>1.9</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.modules.editor.lib</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.27</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.modules.editor.settings</code-name-base>
<build-prerequisite/>

View File

@ -36,7 +36,6 @@ import javax.swing.text.Document;
import org.netbeans.api.editor.settings.SimpleValueNames;
import org.netbeans.api.java.source.CancellableTask;
import org.netbeans.api.java.source.CompilationInfo;
import org.netbeans.editor.BaseDocument;
import org.netbeans.modules.editor.NbEditorUtilities;
import org.openide.loaders.DataObject;
import org.openide.cookies.LineCookie;
@ -95,11 +94,9 @@ public class Scanner implements CancellableTask<CompilationInfo> {
}
int tabSize = 8;
if (doc instanceof BaseDocument) {
Integer foo = (Integer) doc.getProperty(SimpleValueNames.TAB_SIZE);
if (foo != null)
tabSize = foo.intValue();
}
Integer foo = (Integer) doc.getProperty(SimpleValueNames.TAB_SIZE);
if (foo != null)
tabSize = foo.intValue();
DataObject dobj = NbEditorUtilities.getDataObject(doc);
if (dobj == null) {