-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ability to put the items in the main menu not in the "EasyShell"
sub-menu #15 - fixes #15 - add preferences - minor refactoring Signed-off-by: Andre Bossert <[email protected]>
- Loading branch information
Showing
12 changed files
with
267 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
plugin/src/de/anbos/eclipse/easyshell/plugin/commands/DefineCommandsForMainMenu.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/** | ||
* Copyright (c) 2014-2020 Andre Bossert <[email protected]>. | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0 | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
|
||
package de.anbos.eclipse.easyshell.plugin.commands; | ||
|
||
import org.eclipse.ui.menus.IContributionRoot; | ||
import org.eclipse.ui.services.IServiceLocator; | ||
|
||
import de.anbos.eclipse.easyshell.plugin.preferences.GeneralDataStore; | ||
import de.anbos.eclipse.easyshell.plugin.types.CheckBox; | ||
import de.anbos.eclipse.easyshell.plugin.types.ResourceType; | ||
|
||
public class DefineCommandsForMainMenu extends DefineCommands { | ||
|
||
public DefineCommandsForMainMenu() { | ||
} | ||
|
||
@Override | ||
public void createContributionItems(IServiceLocator serviceLocator, IContributionRoot additions) { | ||
if (GeneralDataStore.instance().getData().getMenuMain() != CheckBox.yes) { | ||
return; | ||
} | ||
createContributionItemsForResType(ResourceType.resourceTypeFileOrDirectory, serviceLocator, additions); | ||
} | ||
|
||
@Override | ||
public boolean showMenuImage() { | ||
return false; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.