Skip to content

Commit

Permalink
Enable references, implementations, and method param names code minings
Browse files Browse the repository at this point in the history
Tied to Java > Editor > Code Minings preferences

#919
  • Loading branch information
eric-milles committed Jun 30, 2019
1 parent 4443c03 commit 02e59d2
Show file tree
Hide file tree
Showing 11 changed files with 58 additions and 629 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@
unpack="false"
/>

<plugin
id="org.codehaus.groovy.eclipse.mining"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"
/>

<plugin
id="org.codehaus.groovy.eclipse.quickfix"
download-size="0"
Expand Down
1 change: 0 additions & 1 deletion ide/Feature-org.codehaus.groovy.eclipse.photon/.gitignore

This file was deleted.

17 changes: 0 additions & 17 deletions ide/Feature-org.codehaus.groovy.eclipse.photon/.project

This file was deleted.

This file was deleted.

319 changes: 0 additions & 319 deletions ide/Feature-org.codehaus.groovy.eclipse.photon/epl-v10.html

This file was deleted.

124 changes: 0 additions & 124 deletions ide/Feature-org.codehaus.groovy.eclipse.photon/feature.properties

This file was deleted.

33 changes: 0 additions & 33 deletions ide/Feature-org.codehaus.groovy.eclipse.photon/feature.xml

This file was deleted.

109 changes: 0 additions & 109 deletions ide/Feature-org.codehaus.groovy.eclipse.photon/license.html

This file was deleted.

13 changes: 0 additions & 13 deletions ide/Feature-org.codehaus.groovy.eclipse.photon/pom.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Bundle-Version: 3.5.0.qualifier
Export-Package: org.codehaus.groovy.eclipse.mining
Import-Package: org.codehaus.groovy.eclipse.codeassist.completions,
org.eclipse.swt.events
Require-Bundle: org.eclipse.jdt.groovy.core;bundle-version="3.5.0",
Require-Bundle: org.codehaus.groovy.eclipse.ui;bundle-version="3.5.0",
org.eclipse.jface.text;bundle-version="3.13.0",
org.eclipse.ui.workbench;bundle-version="3.111.0"
Bundle-ActivationPolicy: lazy
Expand Down
58 changes: 49 additions & 9 deletions ide/org.codehaus.groovy.eclipse.mining/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,57 @@
id="org.codehaus.groovy.eclipse.mining.method_parameter"
label="Method parameter metadata">
<enabledWhen>
<with variable="editorInput">
<and>
<test property="org.eclipse.jdt.ui.hasPreference"
value="editor_codemining_enabled" forcePluginActivation="true" />
<test property="org.eclipse.jdt.ui.hasPreference"
value="java.codemining.parameterNames" forcePluginActivation="true"/>
<with variable="editor">
<instanceof value="org.codehaus.groovy.eclipse.editor.GroovyEditor" />
</with>
<with variable="editorInput">
<or>
<adapt type="org.eclipse.core.resources.IFile">
<test property="org.eclipse.core.resources.contentTypeId"
value="org.eclipse.jdt.groovy.core.groovySource" />
</adapt>
<!--adapt type="org.eclipse.jdt.core.IClassFile">
<instanceof value="org.eclipse.jdt.core.IClassFile" />
</adapt-->
</or>
</with>
</and>
</enabledWhen>
</codeMiningProvider>
<codeMiningProvider
class="org.eclipse.jdt.internal.ui.javaeditor.codemining.JavaElementCodeMiningProvider"
id="org.eclipse.jdt.ui.codemining.javaelement"
label="%JavaElementCodeMiningProvider.label">
<enabledWhen>
<and>
<test property="org.eclipse.jdt.ui.hasPreference"
value="editor_codemining_enabled" forcePluginActivation="true" />
<or>
<adapt type="org.eclipse.core.resources.IFile">
<test property="org.eclipse.core.resources.contentTypeId"
value="org.eclipse.jdt.groovy.core.groovySource" />
</adapt>
<!--adapt type="org.eclipse.jdt.core.IClassFile">
<instanceof value="org.eclipse.jdt.core.IClassFile" />
</adapt-->
<test property="org.eclipse.jdt.ui.hasPreference"
value="java.codemining.references" forcePluginActivation="true" />
<test property="org.eclipse.jdt.ui.hasPreference"
value="java.codemining.implementations" forcePluginActivation="true" />
</or>
</with>
<with variable="editor">
<instanceof value="org.codehaus.groovy.eclipse.editor.GroovyEditor" />
</with>
<with variable="editorInput">
<or>
<adapt type="org.eclipse.core.resources.IFile">
<test property="org.eclipse.core.resources.contentTypeId"
value="org.eclipse.jdt.groovy.core.groovySource" />
</adapt>
<!--adapt type="org.eclipse.jdt.core.IClassFile">
<instanceof value="org.eclipse.jdt.core.IClassFile" />
</adapt-->
</or>
</with>
</and>
</enabledWhen>
</codeMiningProvider>
</extension>
Expand Down

1 comment on commit 02e59d2

@eric-milles
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.