| Notes about the STEM - GoogleEarth interface |
| org.eclipse.stem.ge |
| |
| This file has notes that document interesting things relating to the STEM GoogleEarth interface code that should be preserved for future generation. |
| ----------------------------------------------------------- |
| Creating ANT build.xml (in progress) |
| rightclick plugin.xml ->PDE Tools -> Create Ant Build file |
| |
| Change |
| <property name="javacSource" value="1.5"/> |
| <property name="javacTarget" value="1.5"/> |
| |
| cd C:\stem\org.eclipse.stem.ge |
| ant zip.plugin |
| |
| Note the above is incomplete.... |
| ----------------------------------------------------------- |
| |
| Running the GoogleEarth interface under STEM |
| |
| - Install and test GoogleEarth |
| - update to the latest code and ensure it is refreshed and rebuilt |
| - Update the launch script to specify VM arguments -Xmx512M |
| - From Eclipse, Run Stem using stem.product |
| |
| In the new STEM workspace window |
| - Windows->Open Perspective->Simulation |
| - Windows->Show View->Other->Stem->GoogleEarth |
| - Windows->Preferences->GoogleEarth |
| Specify any preferences that you want to use |
| - Scenarios: select STEM->Pandemic Demo |
| - From the toolbar STEM icons, select "Advance" |
| - Select GoogleEarth View window |
| - Select the Simulation then right click for popup menu |
| - select DisplayMap to send a map to GoogleEarth |
| |
| |
| |
| -------------------------------------------------------------------- |
| |
| Using SWT Program.launch(fn) |
| |
| This uses the SWT Program utility class to launch the KML file to the GoogleEarth application. |
| For some reason, although it compiles with no problem, at runtime it fails because it needs platform dependent JNI methods. |
| On Windows it needs the dll file |
| swt-win32-3232.dll |
| |
| After many fruitless attempts to get this to work I used the following hack to bypass the problem. |
| Go to: |
| http://download.eclipse.org/eclipse/downloads/drops/R-3.2-200606291905/index.php |
| Download: |
| swt-3.2-win32-win32-x86.zip |
| extract |
| swt-win32-3232.dll |
| put it in the root directory of the ge project. |
| It is then checked into SVN |
| |
| This seems to work but would have to be slightly redone to support other platforms. |
| |
| If someone figures out a better way to handle crossplatform support for SWT, please document it here. |
| |
| ------------------------------------------------------------------- |
| Embeded Web Server |
| ------------------------------------------------------------------- |
| See the following URL for information about using the web server |
| that is embeded in Eclipse. |
| http://www.eclipsezone.com/eclipse/forums/t62852.html?start=0 |
| |
| We use this and it is started in StemKml.java |
| |
| There are special consideration to make the embedded web server run |
| in a standalone Eclipse RCP. The basic problem is that the embedded Tomcat server |
| cannot read from jar files and the default when exporting plugins from |
| Eclipse is to package it in a jar. |
| A hack to bypass this is to do the following: |
| - Modify build.properties so that "bin/" is included in |
| the bin.includes statement. |
| - Modify manifest.mf to include |
| Bundle-ClassPath: bin/ |
| Then run the export wizard from org.eclipse.stem.ui/stem.product |
| |
| There must be better ways to do this but at least |
| in 3.2.1, the above works. |
| |
| ------------------------------------------------------------------- |
| example.kml |
| ------------------------------------------------------------------- |
| |
| File example.kml is an example of the KML that is generated by the Stem to GoogleEarth interface (actually this was from Stem 1 but should be the same of similar for Stem 2) |
| |
| -------------------------------------------------------------------- |
| |
| Running on 2 processors with network attached files |
| |
| System1 |
| STEM |
| Folder netlink \\system1\c.tmp\ge |
| |
| |
| System2 |
| Folder c:/tmp/ge |
| Share c:\tmp as c.tmp |
| Tomcat |
| |
| GoogleEarth |
| |
| http://system1:8080/slideshow.html |
| |
| cd %CATALINA_HOME% |
| bin\tomcat5.exe |
| |
| An XP service cannot read network files so you have |
| to start Tomcat as a normal application if Tomcat is on the system |
| that reads the network file. Probably best thing to do is |
| run Tomcat and GE on the system that has the native files and let |
| STEM write to the network attached directory. |
| |
| ---------------------------------------------------------------------- |