This file contains hidden or 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
| //var topPanel = panel.add_Panel(true); | |
| var topPanel = "Util - Browse TeamMentor Libraries v1.0".popupWindow(800,500); | |
| topPanel.insert_LogViewer(); | |
| //var defaultServer = "http://localhost:12120"; | |
| var defaultServer = "https://owasp.teammentor.net"; | |
| var defaultUsername = ""; | |
| var defaultPassword = ""; | |
| var stopRequests = false; |
This file contains hidden or 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
| def fortifyAPI = tm.eclipse.ui.Startup.loadedPlugins.first() | |
| def issuesList = fortifyAPI.getIssuesListView() | |
| def tree = issuesList.tree.getTree(); | |
| //return String.format("%s \n %s " , this.class.getClassLoader() , issuesList.class.getClassLoader()); | |
| def _eclipse = eclipse | |
| def groovyExecution = new GroovyExecution(); | |
| def folder = "/Users/plugin/_Dev/eclipses/QA - Fortify - Kepler/plugins/com.fortify.plugin.remediation_3.90.0/Core/lib/"; |
This file contains hidden or 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
| import org.eclipse.swt.*; | |
| // creates a new Eclipse view with the the title: 'This is a the view ID and title)' | |
| // the view | |
| def view = eclipseUI.new_View("This is a the view ID and title)").clear(); | |
| view.add_Button("first Button"); // add a button | |
| view.add_Text ("this is a text (no border)") // add a Text(box) | |
| view.add_Text (SWT.BORDER).setText("this is a text "); // add a Text(box) with a border | |
| view.add_Text_Search().setText("this is a text with a search icon"); // add a Text(box) that looks like a search box |
This file contains hidden or 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
| //Config:UIThread__False | |
| import org.eclipse.jface.dialogs.* | |
| import org.eclipse.swt.graphics.*; | |
| import org.eclipse.swt.layout.* | |
| import org.eclipse.swt.SWT; | |
| import org.eclipse.swt.widgets.*; | |
| import org.eclipse.swt.events.*; | |
| def panel = eclipseUI.new_Panel("view images").clear() |
This file contains hidden or 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
| def binFolder = GroovyExecution.class.getProtectionDomain().getCodeSource().getLocation(); | |
| def unitTests = new URL(binFolder, "../../TeamMentor.Eclipse.UxTests/bin/"); | |
| def groovyExecution = new GroovyExecution(); | |
| groovyExecution.addRefToGroovyShell(unitTests.getPath() + "/"); | |
| groovyExecution.execute_JUnit_Test("tm.eclipse.helpers.Images_Test"); | |
| return groovyExecution |
This file contains hidden or 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
| import tm.eclipse.ui.PluginPreferences.*; | |
| def mainPreferences = new MainPreferences(); | |
| def viewId = "test login preferences"; | |
| eclipseUI.add_View(viewId).close() | |
| def view = eclipseUI.add_View(viewId); | |
| mainPreferences.control = view.composite; | |
| mainPreferences.createContents(view.composite) |
This file contains hidden or 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
| import java.io.IOException; | |
| public class PoC_XMLGenerator | |
| { | |
| public static void main(String[] args) throws IOException | |
| { | |
| String process = "open"; | |
| String arguments = "/Applications/Calculator.app"; | |
This file contains hidden or 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
| /*<!--<method> | |
| <class>com.foo.MyThing</class> | |
| <name>doStuff</name> | |
| <parameter-types> | |
| <class>java.lang.String</class> | |
| <class>java.util.Iterator</class> | |
| </parameter-types> | |
| </method>()--> | |
| */ | |
| def groovyExecution = new GroovyExecution(); |
This file contains hidden or 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
| import org.eclipse.swt.*; | |
| import org.eclipse.swt.events.*; | |
| import org.eclipse.swt.widgets.*; | |
| def e = new Event(); | |
| e.type = SWT.MouseMove | |
| for(int i : 1..50) | |
| { | |
| e.x = 100 + i * 10; | |
| e.y = 200 + i; |
This file contains hidden or 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
| def inputJavaElement = eclipse.editors.compilationUnits().first().getInputJavaElement() | |
| def compilationUnit = inputJavaElement.getCompilationUnit(); | |
| def type = compilationUnit.getTypes()[0]; | |
| def method = type.getMethods()[0]; | |
| //inspect(method) | |
| return method.source; |