Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Schindl2013-12-17 18:12:28 -0500
committerTom Schindl2013-12-17 18:12:28 -0500
commit6f921f86aa81eab97f585ab58ec8ed0bd25ce8e0 (patch)
tree5f57e1a71cb7998d701ac5a7afe90f6b06492d8c
parentb8042ff59df1cec84bcb56d44d6393b1a9f44105 (diff)
downloadorg.eclipse.efxclipse-6f921f86aa81eab97f585ab58ec8ed0bd25ce8e0.tar.gz
org.eclipse.efxclipse-6f921f86aa81eab97f585ab58ec8ed0bd25ce8e0.tar.xz
org.eclipse.efxclipse-6f921f86aa81eab97f585ab58ec8ed0bd25ce8e0.zip
fixed npe
-rwxr-xr-xbundles/tooling/org.eclipse.fx.ide.css.cssext.ui/.settings/org.eclipse.jdt.core.prefs113
-rwxr-xr-xbundles/tooling/org.eclipse.fx.ide.css.cssext.ui/src/org/eclipse/fx/ide/css/cssext/ui/doc/CssExtDocParser.java9
-rwxr-xr-xbundles/tooling/org.eclipse.fx.ide.css.cssext.ui/src/org/eclipse/fx/ide/css/cssext/ui/highlighting/CssExtSemanticHighlightingCalculator.java12
3 files changed, 124 insertions, 10 deletions
diff --git a/bundles/tooling/org.eclipse.fx.ide.css.cssext.ui/.settings/org.eclipse.jdt.core.prefs b/bundles/tooling/org.eclipse.fx.ide.css.cssext.ui/.settings/org.eclipse.jdt.core.prefs
index f42de363a..5671530f4 100755
--- a/bundles/tooling/org.eclipse.fx.ide.css.cssext.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/bundles/tooling/org.eclipse.fx.ide.css.cssext.ui/.settings/org.eclipse.jdt.core.prefs
@@ -1,7 +1,114 @@
eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=warning
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=warning
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=warning
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=warning
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/bundles/tooling/org.eclipse.fx.ide.css.cssext.ui/src/org/eclipse/fx/ide/css/cssext/ui/doc/CssExtDocParser.java b/bundles/tooling/org.eclipse.fx.ide.css.cssext.ui/src/org/eclipse/fx/ide/css/cssext/ui/doc/CssExtDocParser.java
index 415a5fee4..919dc319b 100755
--- a/bundles/tooling/org.eclipse.fx.ide.css.cssext.ui/src/org/eclipse/fx/ide/css/cssext/ui/doc/CssExtDocParser.java
+++ b/bundles/tooling/org.eclipse.fx.ide.css.cssext.ui/src/org/eclipse/fx/ide/css/cssext/ui/doc/CssExtDocParser.java
@@ -294,16 +294,17 @@ public class CssExtDocParser {
URL fileUrl = null;
try {
fileUrl = FileLocator.toFileURL(bundleUrl);
+ String url = fileUrl.toExternalForm();
+ out.append("<img class=\"symbol\" src=\""+ url +"\"/>");
}
catch (IOException e) {
- fileUrl = null;
+ e.printStackTrace();
}
- String url = fileUrl.toExternalForm();
- out.append("<img class=\"symbol\" src=\""+ url +"\"/>");
+
}
private void printName(StringBuffer out, String name) {
- out.append("<span class=\"name\"><b>" + name + "</b></span>");
+ out.append("<span class=\"name\"><b>" + name + "</b></span>"); //$NON-NLS-1$
}
private void printStyleClass(StringBuffer out, ElementDefinition elDef) {
if (elDef.getStyleclass() != null) {
diff --git a/bundles/tooling/org.eclipse.fx.ide.css.cssext.ui/src/org/eclipse/fx/ide/css/cssext/ui/highlighting/CssExtSemanticHighlightingCalculator.java b/bundles/tooling/org.eclipse.fx.ide.css.cssext.ui/src/org/eclipse/fx/ide/css/cssext/ui/highlighting/CssExtSemanticHighlightingCalculator.java
index 249987c22..0134c1d34 100755
--- a/bundles/tooling/org.eclipse.fx.ide.css.cssext.ui/src/org/eclipse/fx/ide/css/cssext/ui/highlighting/CssExtSemanticHighlightingCalculator.java
+++ b/bundles/tooling/org.eclipse.fx.ide.css.cssext.ui/src/org/eclipse/fx/ide/css/cssext/ui/highlighting/CssExtSemanticHighlightingCalculator.java
@@ -14,10 +14,10 @@ import org.eclipse.xtext.TerminalRule;
import org.eclipse.xtext.nodemodel.BidiTreeIterator;
import org.eclipse.xtext.nodemodel.INode;
import org.eclipse.xtext.nodemodel.impl.HiddenLeafNode;
+import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.resource.XtextResource;
import org.eclipse.xtext.ui.editor.syntaxcoloring.IHighlightedPositionAcceptor;
import org.eclipse.xtext.ui.editor.syntaxcoloring.ISemanticHighlightingCalculator;
-
import org.eclipse.fx.ide.css.cssext.cssExtDsl.CSSRuleDefinition;
import org.eclipse.fx.ide.css.cssext.cssExtDsl.CSSRuleRef;
import org.eclipse.fx.ide.css.cssext.cssExtDsl.Definition;
@@ -32,11 +32,17 @@ public class CssExtSemanticHighlightingCalculator implements
@Override
public void provideHighlightingFor(XtextResource resource,
IHighlightedPositionAcceptor acceptor) {
- if( resource == null || resource.getParseResult() == null) {
+ if( resource == null) {
+ return;
+ }
+
+ IParseResult pr = resource.getParseResult();
+
+ if( pr == null ) {
return;
}
- INode root = resource.getParseResult().getRootNode();
+ INode root = pr.getRootNode();
BidiTreeIterator<INode> it = root.getAsTreeIterable().iterator();
while( it.hasNext() ) {
INode node = it.next();

Back to the top