-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9a16b2f
commit 115ea2c
Showing
7 changed files
with
64 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<?eclipse version="3.4"?> | ||
<plugin> | ||
|
||
<extension | ||
point="org.eclipse.ui.menus"> | ||
<menuContribution | ||
locationURI="menu:org.eclipse.ui.main.menu"> | ||
<menu | ||
id="window" | ||
label="Window"> | ||
<command | ||
commandId="org.eclipse.swt.snippets.launcher" | ||
label="SWT Snippets" | ||
style="push"> | ||
</command> | ||
</menu> | ||
</menuContribution> | ||
</extension> | ||
<extension | ||
point="org.eclipse.ui.commands"> | ||
<command | ||
id="org.eclipse.swt.snippets.launcher" | ||
name="SWT Snippets"> | ||
</command> | ||
</extension> | ||
<extension point="org.eclipse.ui.handlers"> | ||
<handler commandId="org.eclipse.swt.snippets.launcher" | ||
class="org.eclipse.swt.snippets.SnippetHandler" /> | ||
</extension> | ||
|
||
</plugin> |
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
15 changes: 15 additions & 0 deletions
15
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/SnippetHandler.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,15 @@ | ||
package org.eclipse.swt.snippets; | ||
|
||
import org.eclipse.core.commands.*; | ||
|
||
public class SnippetHandler extends AbstractHandler{ | ||
@Override | ||
public Object execute(ExecutionEvent event) throws ExecutionException { | ||
try { | ||
SnippetExplorer.main(null); | ||
} catch (Exception e) { | ||
e.printStackTrace(); | ||
} | ||
return Integer.valueOf(0); | ||
} | ||
} |
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