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
| // A) get list of current installed plugins | |
| return eclipse.registry.views_Ids().sort() | |
| // B) get findings view | |
| def findings = eclipse.views.open("com.ouncelabs.osa.ui.base.views.findings"); | |
| return findings; | |
| // C) view findings object (properties, fields and methods) | |
| def findings = eclipse.views.open("com.ouncelabs.osa.ui.base.views.findings"); | |
| show(findings) // return value: com.ouncelabs.osa.ui.extended.views.FindingsView@1d4e177 |
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
| "System.Web.dll".assembly().type("UnsafeNativeMethods").invokeStatic("RevertToSelf"); | |
| return "cmd.exe".startProcess_getConsoleOut("/c ipconfig"); | |
| return WindowsIdentity.GetCurrent().Name; // stays the same |
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
| <!DOCTYPE html> | |
| <html ng-app> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Angular example (with Firebug lite)</title> | |
| <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.min.js"></script> | |
| <script src="https://getfirebug.com/firebug-lite-debug.js" ></script> | |
| <link href ="http://angularjs.org/css/bootstrap.min.css" rel="stylesheet" ></link> | |
| </head> | |
| <script type="text/javascript"> |
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 visible = false; | |
| for(editor in eclipse.editors.list()) | |
| if (editor.id == "org.eclipse.ui.browser.editor") | |
| editor.getEditor(true).webBrowser.busy.visible = visible; |
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 editor = eclipse.editors.get("blog-02-28-2014 (1).xml").getEditor(true); | |
| def xmlFile = editor.getEditorInput().fileStore.toString(); | |
| return xmlFile; |
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.nio.file.*; | |
| import com.sun.nio.file.* | |
| import java.nio.file.attribute.*; | |
| def editorTitle = "index.html" | |
| def refreshBrowser = { path -> | |
| eclipse.log("Opening browser with: " + path); | |
| def view = eclipse.views.create("Synced WebBrowser"); | |
| if (view.controls().size() == 0) |
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
| <h5>Current messages:</h5> | |
| <table class="table table-striped"> | |
| <thead> | |
| <tr> | |
| <th>message</th> | |
| </tr> | |
| </thead> | |
| <tbody> | |
| <tr ng-repeat="message in messages" > |
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
| Action<string,string,string,string> sendData_Raw = | |
| (app,token, area, data)=> | |
| { | |
| ThreadPool.QueueUserWorkItem((o)=> | |
| { | |
| var url = "https://{0}.firebaseio.com/{1}.json?auth={2}".format(app, area, token); | |
| var now = DateTime.Now.ToShortTimeString(); // DateTime.Now. TimeOfDay; | |
| var postData = "\"{0}: {1}\"".format(now, data.replace("\"", "'")); | |
| url.POST(postData); | |
| }); |
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 msgSent = 1; | |
| var errors = 0; | |
| Action<string,string,string,string> sendMessage = | |
| (app,token, area, message)=> | |
| { | |
| ThreadPool.QueueUserWorkItem((o)=> | |
| { | |
| var url = "https://{0}.firebaseio.com/{1}.json?auth={2}".format(app, area, token); | |
| var now = DateTime.Now. TimeOfDay; //DateTime.Now.ToShortTimeString(); | |
| var data = "\"[{0}] {1}\"".format(now, message.replace("\"", "'")); |
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
| <!doctype html> | |
| <html ng-app="project"> | |
| <head> | |
| <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.js" ></script> | |
| <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular-route.js"></script> | |
| <link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet" > | |
| <script src="app.js"></script> | |
| </head> | |
| <body> |
NewerOlder