From 8aa1ddaa0f9314b22f5cb709b28192e561819f1b Mon Sep 17 00:00:00 2001 From: Ryan Appel Date: Mon, 4 May 2020 07:59:01 -0500 Subject: [PATCH] Function defninitions were failing. This has been fixed and suggestions should pop up now --- .classpath | 4 ++-- .gitignore | 1 + META-INF/MANIFEST.MF | 7 ++----- .../RexxFunctionProposalData.class | Bin 8273 -> 8343 bytes build.properties | 5 +---- .../configuration/FunctionDefinitions.json | 2 +- .../RexxFunctionProposalData.java | 18 +++++++++++------- 7 files changed, 18 insertions(+), 19 deletions(-) create mode 100644 .gitignore diff --git a/.classpath b/.classpath index b9def54..2bcf1fc 100644 --- a/.classpath +++ b/.classpath @@ -19,7 +19,7 @@ - - + + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ae3c172 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/META-INF/MANIFEST.MF b/META-INF/MANIFEST.MF index f806c16..76d37d0 100644 --- a/META-INF/MANIFEST.MF +++ b/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: RexxEditor Plug-in Bundle-SymbolicName: RexxEditor; singleton:=true -Bundle-Version: 0.1.1 +Bundle-Version: 0.1.0 Bundle-Activator: org.imperfectmommy.rexxeditor.Activator Bundle-Localization: plugin Require-Bundle: org.eclipse.ui, @@ -10,13 +10,10 @@ Require-Bundle: org.eclipse.ui, org.eclipse.jface.text, org.eclipse.ui.editors, org.eclipse.ui.workbench.texteditor, - org.eclipse.debug.core, - org.eclipse.core.resources, org.eclipse.ui.ide, org.eclipse.ui.views, org.eclipse.debug.ui, - org.eclipse.ui.console, - com.fasterxml.jackson.core.jackson-core;bundle-version="2.10.3" + org.eclipse.cdt.core;bundle-version="6.11.0" Bundle-ActivationPolicy: lazy Bundle-Vendor: org.imperfectmommy Export-Package: ., diff --git a/bin/org/imperfectmommy/rexxeditor/contentassist/RexxFunctionProposalData.class b/bin/org/imperfectmommy/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zfz8b9;!Fmh6;W*A zI~B3s5OxntWpq01n1Mpvf?~`>B^q%PX7M;13;5lN+YrMXEXAGhG9w6y_uqjYY~xii zCSW_>VD(CjM0^K!LdW#M*oAd`P$MkZ4Id0FVZfVsiz&DB0WADMz{-qy9fyWWA zbs6)9OzMxHX9@@La{_;8s{iyZFKhE851OeCJ>@wJoyk4@cy^+`>NTML|DZ2H#stY+ zu#?x+SJ#hNgR$2zRj%Y3<|fE&C#yK_$s?1vPS!%L1umnSE@3p%$VEB5;bJ(`h-vBEtiB#{ zYe7*L1G-eVY9|5lloPdgBMsEL!D6C(Dqw^=gnL^1_W%kvh89VRKfRwob3Xxv3fVTG n=PUCuG>ER}H;YplW93vql{ADA8(Zk08))b#7Y(Cos)g%6@)(iG diff --git a/build.properties b/build.properties index 42fcf31..72d4572 100644 --- a/build.properties +++ b/build.properties @@ -4,7 +4,4 @@ bin.includes = plugin.xml,\ META-INF/,\ .,\ icons/,\ - resources/,\ - resources/libaries/jackson-core-2.10.3.jar,\ - resources/libaries/jackson-databind-2.10.3.jar,\ - resources/libaries/jackson-annotations-2.10.3.jar + resources/ diff --git a/resources/configuration/FunctionDefinitions.json b/resources/configuration/FunctionDefinitions.json index 868d3ef..51256dd 100644 --- a/resources/configuration/FunctionDefinitions.json +++ b/resources/configuration/FunctionDefinitions.json @@ -961,7 +961,7 @@ ], "additionalInfo": "" }, - //TODO: C2D, C2X, DATATYPE, DATE, DELSTR, DELWORD, DIGITS< D2C, D2X, ERRORTEXT, FORM, FORMAT, FORMAT (v2), FUZZ, INSERT, LASTPOS, LEFT< LENGTH, LINEIN, Lineout, LINES, MAX, MIN, OVERLAY + //TODO: DATE, DELSTR, DELWORD, DIGITS< D2C, D2X, ERRORTEXT, FORM, FORMAT, FORMAT (v2), FUZZ, INSERT, LASTPOS, LEFT< LENGTH, LINEIN, Lineout, LINES, MAX, MIN, OVERLAY { "pattern": "POS(Needle,Haystack)", "returnValue": { diff --git a/src/org/imperfectmommy/rexxeditor/contentassist/RexxFunctionProposalData.java b/src/org/imperfectmommy/rexxeditor/contentassist/RexxFunctionProposalData.java index cb37098..29dbbee 100644 --- a/src/org/imperfectmommy/rexxeditor/contentassist/RexxFunctionProposalData.java +++ b/src/org/imperfectmommy/rexxeditor/contentassist/RexxFunctionProposalData.java @@ -29,7 +29,8 @@ public String getFunctionName() { public Template getTemplate() { if (template == null) { - this.template = new Template(this.pattern + ": " + this.returnValue.getType(), "builtin: " + this.getAdditionalInfo(), "org.imperfectmommy.rexxeditor.editors.RexxEditor", this.pattern, false); + this.template = + new Template(this.pattern + ": " + this.returnValue.getType(), "builtin: " + this.getAdditionalInfo(), "org.imperfectmommy.rexxeditor.editors.RexxEditor", this.pattern, false); } return template; } @@ -79,13 +80,16 @@ public void setAdditionalInfo(String additionalInfo) { public static Map getFunctionMap() { if (functionMap.isEmpty()) { try { - ObjectMapper mapper = new ObjectMapper(); + ObjectMapper mapper = new ObjectMapper(); mapper.enable(JsonParser.Feature.ALLOW_COMMENTS); - Bundle bundle = org.eclipse.core.runtime.Platform.getBundle("RexxEditor"); - URL fUrl = bundle.getEntry("resources/configuration/FunctionDefinitions.json"); - RexxFunctionProposalData[] data = mapper.readValue(fUrl.openConnection().getInputStream(), RexxFunctionProposalData[].class); - for (RexxFunctionProposalData rexxFunctionProposalData : data) { - functionMap.putIfAbsent(rexxFunctionProposalData.pattern, rexxFunctionProposalData); + Bundle bundle = org.eclipse.core.runtime.Platform.getBundle("RexxEditor"); + URL fUrl = bundle.getEntry("resources/configuration/FunctionDefinitions.json"); + if (mapper.canSerialize(RexxFunctionProposalData.class)) { + RexxFunctionProposalData[] data = mapper.readValue(fUrl.openConnection().getInputStream(), RexxFunctionProposalData[].class); + for (RexxFunctionProposalData rexxFunctionProposalData : data) { + functionMap.putIfAbsent(rexxFunctionProposalData.pattern, rexxFunctionProposalData); + } + } } catch (IOException e) { e.printStackTrace();