Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add project configuration menu contribution #556

Merged
merged 1 commit into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion net.sf.eclipsecs.ui/OSGI-INF/l10n/bundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,6 @@ commands.category.name = Checkstyle
actionSet.label = Checkstyle
extension-point.quickfix-provider.name = Checkstyle Quickfix provider
extension-point.filter-editor.name = Checkstyle filter editors
extension-point.config-types-ui.name = Checkstyle configuration type editors
extension-point.config-types-ui.name = Checkstyle configuration type editors
addnature.label = Add Checkstyle Nature
removenature.label = Remove Checkstyle Nature
55 changes: 50 additions & 5 deletions net.sf.eclipsecs.ui/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
filter="FilesFromPackage"/>
</extension>

<!-- Configuration type editors -->
<extension
<!-- Configuration type editors -->
<extension
point="net.sf.eclipsecs.ui.configtypesui">
<configtypeui
configtypename="builtin"
Expand All @@ -54,7 +54,7 @@
configtypename="project"
editorclass="net.sf.eclipsecs.ui.config.configtypes.ProjectConfigurationEditor"
icon="icons/configtype_project.gif"/>
</extension>
</extension>

<extension
point="org.eclipse.ui.startup">
Expand Down Expand Up @@ -128,8 +128,8 @@
</extension>

<!--
Provide marker resolutions
-->
Provide marker resolutions
-->
<extension
point="org.eclipse.ui.ide.markerResolution">
<markerResolutionGenerator
Expand Down Expand Up @@ -464,6 +464,51 @@
menubarPath="Checkstyle.menu/ondemand"
tooltip="%CheckSelectedFilesAction.tooltip"/>
</objectContribution>

<objectContribution adaptable="true"
id="checkstyle.addNature"
objectClass="org.eclipse.core.resources.IProject">
<action class="net.sf.eclipsecs.ui.actions.ActivateProjectsAction"
enablesFor="+"
icon="icons/checkstyle_command.png"
id="checkstyle.addNature.action"
label="%addnature.label"
menubarPath="org.eclipse.ui.projectConfigure/additions"
style="push">
</action>
<visibility>
<and>
<objectState name="open" value="true"/>
<objectState name="projectNature"
value="org.eclipse.jdt.core.javanature">
</objectState>
<not>
<objectState name="projectNature"
value="net.sf.eclipsecs.core.CheckstyleNature">
</objectState>
</not>
</and>
</visibility>
</objectContribution>
<objectContribution adaptable="true"
id="checkstyle.removeNature"
objectClass="org.eclipse.core.resources.IProject">
<action class="net.sf.eclipsecs.ui.actions.DeactivateProjectsAction"
enablesFor="1"
id="checkstyle.removeNature.action"
label="%removenature.label"
menubarPath="org.eclipse.ui.projectConfigure/additions"
style="push">
</action>
<visibility>
<and>
<objectState name="open" value="true"/>
<objectState name="projectNature"
value="net.sf.eclipsecs.core.CheckstyleNature">
</objectState>
</and>
</visibility>
</objectContribution>
</extension>

<extension
Expand Down