-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Seems to work when only reformat is selected if there is some extra char at end of line and re-format, then no. Also, may need two save to reset the dirty flag, seems the re-format occurs after and make the file dirty again. Signed-off-by: Jacques Bouthillier <jacques.bouthillier@ericsson.com>
- Loading branch information
Showing
4 changed files
with
190 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
package helloproject.actions; | ||
|
||
import org.eclipse.jface.action.IAction; | ||
import org.eclipse.jface.viewers.ISelection; | ||
import org.eclipse.ui.IWorkbenchWindow; | ||
import org.eclipse.ui.IWorkbenchWindowActionDelegate; | ||
import org.eclipse.jface.dialogs.MessageDialog; | ||
|
||
/** | ||
* Our sample action implements workbench action delegate. | ||
* The action proxy will be created by the workbench and | ||
* shown in the UI. When the user tries to use the action, | ||
* this delegate will be created and execution will be | ||
* delegated to it. | ||
* @see IWorkbenchWindowActionDelegate | ||
*/ | ||
public class SampleAction implements IWorkbenchWindowActionDelegate { | ||
private IWorkbenchWindow window; | ||
/** | ||
* The constructor. | ||
*/ | ||
public SampleAction() { | ||
|
||
//JB add a new line | ||
} | ||
|
||
/** | ||
* The action has been activated. The argument of the | ||
* method represents the 'real' action sitting | ||
* in the workbench UI. | ||
* @see IWorkbenchWindowActionDelegate#run | ||
*/ | ||
public void run(IAction action) { | ||
MessageDialog.openInformation( | ||
window.getShell(), | ||
"HelloProject", | ||
"Hello, Eclipse world"); | ||
} | ||
|
||
/** | ||
* Selection in the workbench has been changed. We | ||
* can change the state of the 'real' action here | ||
* if we want, but this can only happen after | ||
* the delegate has been created. | ||
* @see IWorkbenchWindowActionDelegate#selectionChanged | ||
*/ | ||
public void selectionChanged(IAction action, ISelection selection) { | ||
} | ||
|
||
/** | ||
* We can use this method to dispose of any system | ||
* resources we previously allocated. | ||
* @see IWorkbenchWindowActionDelegate#dispose | ||
*/ | ||
public void dispose() { | ||
} | ||
|
||
/** | ||
* We will cache window object in order to | ||
* be able to provide parent shell for the message dialog. | ||
* @see IWorkbenchWindowActionDelegate#init | ||
*/ | ||
public void init(IWorkbenchWindow window) { | ||
this.window = window; | ||
} | ||
} |
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