Author: mes
Date: 2010-11-15 11:50:28 -0800 (Mon, 15 Nov 2010)
New Revision: 22848
Added:
core3/swing-util/trunk/src/main/java/org/cytoscape/util/swing/OpenBrowser.java
core3/swing-util/trunk/src/main/java/org/cytoscape/util/swing/internal/OpenBrowserImpl.java
Removed:
core3/swing-application-api/trunk/src/main/java/org/cytoscape/application/swing/util/OpenBrowser.java
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/util/OpenBrowserImpl.java
Modified:
core3/linkout-impl/trunk/pom.xml
core3/linkout-impl/trunk/src/main/java/org/cytoscape/linkout/internal/LinkOut.java
core3/linkout-impl/trunk/src/main/resources/META-INF/spring/bundle-context-osgi.xml
core3/linkout-impl/trunk/src/main/resources/META-INF/spring/bundle-context.xml
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/dialogs/AboutDialogFactoryImpl.java
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/dialogs/AboutDialogImpl.java
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/view/help/HelpContactHelpDeskTask.java
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/view/help/HelpContactHelpDeskTaskFactory.java
core3/swing-application-impl/trunk/src/main/resources/META-INF/spring/bundle-context-osgi.xml
core3/swing-application-impl/trunk/src/main/resources/META-INF/spring/bundle-context.xml
core3/swing-util/trunk/pom.xml
core3/swing-util/trunk/src/main/resources/META-INF/spring/bundle-context-osgi.xml
core3/swing-util/trunk/src/main/resources/META-INF/spring/bundle-context.xml
Log:
more clean up of package names
Modified: core3/linkout-impl/trunk/pom.xml
===================================================================
--- core3/linkout-impl/trunk/pom.xml 2010-11-15 19:27:50 UTC (rev 22847)
+++ core3/linkout-impl/trunk/pom.xml 2010-11-15 19:50:28 UTC (rev 22848)
@@ -61,7 +61,7 @@
</dependency>
<dependency>
<groupId>org.cytoscape</groupId>
- <artifactId>swing-application-api</artifactId>
+ <artifactId>swing-util</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
@@ -69,14 +69,6 @@
<artifactId>service-util</artifactId>
<version>3.0.0-alpha2-SNAPSHOT</version>
</dependency>
-
- <!-- This is necessary to validate Spring XML. -->
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-beans</artifactId>
- <version>${spring.version}</version>
- <scope>provided</scope>
- </dependency>
</dependencies>
</project>
Modified:
core3/linkout-impl/trunk/src/main/java/org/cytoscape/linkout/internal/LinkOut.java
===================================================================
---
core3/linkout-impl/trunk/src/main/java/org/cytoscape/linkout/internal/LinkOut.java
2010-11-15 19:27:50 UTC (rev 22847)
+++
core3/linkout-impl/trunk/src/main/java/org/cytoscape/linkout/internal/LinkOut.java
2010-11-15 19:50:28 UTC (rev 22848)
@@ -7,12 +7,12 @@
import java.util.Hashtable;
import java.util.Properties;
-import org.cytoscape.application.swing.util.OpenBrowser;
import org.cytoscape.model.CyNode;
import org.cytoscape.property.CyProperty;
import org.cytoscape.service.util.CyServiceRegistrar;
import org.cytoscape.task.AbstractNodeViewTaskFactory;
import org.cytoscape.task.NodeViewTaskFactory;
+import org.cytoscape.util.swing.OpenBrowser;
import org.cytoscape.view.model.View;
import org.cytoscape.work.AbstractTask;
import org.cytoscape.work.TaskIterator;
Modified:
core3/linkout-impl/trunk/src/main/resources/META-INF/spring/bundle-context-osgi.xml
===================================================================
---
core3/linkout-impl/trunk/src/main/resources/META-INF/spring/bundle-context-osgi.xml
2010-11-15 19:27:50 UTC (rev 22847)
+++
core3/linkout-impl/trunk/src/main/resources/META-INF/spring/bundle-context-osgi.xml
2010-11-15 19:50:28 UTC (rev 22848)
@@ -15,4 +15,10 @@
</osgi:service-properties>
</osgi:service>
+ <osgi:reference id="openBrowserServiceRef"
+ interface="org.cytoscape.util.swing.OpenBrowser"/>
+
+ <osgi:reference id="cyServiceRegistrarServiceRef"
+ interface="org.cytoscape.service.util.CyServiceRegistrar"/>
+
</beans>
Modified:
core3/linkout-impl/trunk/src/main/resources/META-INF/spring/bundle-context.xml
===================================================================
---
core3/linkout-impl/trunk/src/main/resources/META-INF/spring/bundle-context.xml
2010-11-15 19:27:50 UTC (rev 22847)
+++
core3/linkout-impl/trunk/src/main/resources/META-INF/spring/bundle-context.xml
2010-11-15 19:50:28 UTC (rev 22848)
@@ -36,8 +36,8 @@
<bean id="linkout" class="org.cytoscape.linkout.internal.LinkOut">
<constructor-arg ref="linkoutProps" />
- <constructor-arg ref="cyServiceRegistrarRef" />
- <constructor-arg ref="openBrowserRef" />
+ <constructor-arg ref="cyServiceRegistrarServiceRef" />
+ <constructor-arg ref="openBrowserServiceRef" />
</bean>
</beans>
Deleted:
core3/swing-application-api/trunk/src/main/java/org/cytoscape/application/swing/util/OpenBrowser.java
===================================================================
---
core3/swing-application-api/trunk/src/main/java/org/cytoscape/application/swing/util/OpenBrowser.java
2010-11-15 19:27:50 UTC (rev 22847)
+++
core3/swing-application-api/trunk/src/main/java/org/cytoscape/application/swing/util/OpenBrowser.java
2010-11-15 19:50:28 UTC (rev 22848)
@@ -1,61 +0,0 @@
-
-/*
- File: OpenBrowser.java
-
- Copyright (c) 2006, The Cytoscape Consortium (www.cytoscape.org)
-
- The Cytoscape Consortium is:
- - Institute for Systems Biology
- - University of California San Diego
- - Memorial Sloan-Kettering Cancer Center
- - Institut Pasteur
- - Agilent Technologies
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation; either version 2.1 of the License, or
- any later version.
-
- This library is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF
- MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. The software and
- documentation provided hereunder is on an "as is" basis, and the
- Institute for Systems Biology and the Whitehead Institute
- have no obligations to provide maintenance, support,
- updates, enhancements or modifications. In no event shall the
- Institute for Systems Biology and the Whitehead Institute
- be liable to any party for direct, indirect, special,
- incidental or consequential damages, including lost profits, arising
- out of the use of this software and its documentation, even if the
- Institute for Systems Biology and the Whitehead Institute
- have been advised of the possibility of such damage. See
- the GNU Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with this library; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-*/
-
-package org.cytoscape.application.swing.util;
-
-
-/**
- * A utility provided as an OSGi service for opening
- * a web browser. The Cytoscape property "defaultWebBrowser"
- * may be set with an alternative command for opening
- * a different web browser than default.
- */
-public interface OpenBrowser {
-
- /**
- * The name of a property for a Properties object used to define an
alternative
- * web browser command.
- */
- String DEF_WEB_BROWSER_PROP_NAME = "defaultWebBrowser";
-
- /**
- * Opens a web browser pointing to the specified URL.
- * @param url A string URL that should be opened in the web browser.
- */
- void openURL(String url);
-}
Modified:
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/dialogs/AboutDialogFactoryImpl.java
===================================================================
---
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/dialogs/AboutDialogFactoryImpl.java
2010-11-15 19:27:50 UTC (rev 22847)
+++
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/dialogs/AboutDialogFactoryImpl.java
2010-11-15 19:50:28 UTC (rev 22848)
@@ -37,7 +37,7 @@
import java.awt.Window;
-import org.cytoscape.application.swing.util.OpenBrowser;
+import org.cytoscape.util.swing.OpenBrowser;
/**
*/
Modified:
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/dialogs/AboutDialogImpl.java
===================================================================
---
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/dialogs/AboutDialogImpl.java
2010-11-15 19:27:50 UTC (rev 22847)
+++
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/dialogs/AboutDialogImpl.java
2010-11-15 19:50:28 UTC (rev 22848)
@@ -46,7 +46,7 @@
import javax.swing.event.HyperlinkEvent;
import javax.swing.event.HyperlinkListener;
-import org.cytoscape.application.swing.util.OpenBrowser;
+import org.cytoscape.util.swing.OpenBrowser;
/**
Deleted:
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/util/OpenBrowserImpl.java
===================================================================
---
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/util/OpenBrowserImpl.java
2010-11-15 19:27:50 UTC (rev 22847)
+++
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/util/OpenBrowserImpl.java
2010-11-15 19:50:28 UTC (rev 22848)
@@ -1,107 +0,0 @@
-/*
- File: OpenBrowserImpl.java
-
- Copyright (c) 2006, The Cytoscape Consortium (www.cytoscape.org)
-
- The Cytoscape Consortium is:
- - Institute for Systems Biology
- - University of California San Diego
- - Memorial Sloan-Kettering Cancer Center
- - Institut Pasteur
- - Agilent Technologies
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation; either version 2.1 of the License, or
- any later version.
-
- This library is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF
- MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. The software and
- documentation provided hereunder is on an "as is" basis, and the
- Institute for Systems Biology and the Whitehead Institute
- have no obligations to provide maintenance, support,
- updates, enhancements or modifications. In no event shall the
- Institute for Systems Biology and the Whitehead Institute
- be liable to any party for direct, indirect, special,
- incidental or consequential damages, including lost profits, arising
- out of the use of this software and its documentation, even if the
- Institute for Systems Biology and the Whitehead Institute
- have been advised of the possibility of such damage. See
- the GNU Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with this library; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-*/
-
-//-------------------------------------------------------------------------
-// $Revision: 13206 $
-// $Date: 2008-02-26 16:37:29 -0800 (Tue, 26 Feb 2008) $
-// $Author: kono $
-//-------------------------------------------------------------------------
-package org.cytoscape.internal.util;
-
-
-import java.io.IOException;
-import java.util.Properties;
-
-import org.cytoscape.application.swing.util.OpenBrowser;
-import org.cytoscape.property.CyProperty;
-
-public class OpenBrowserImpl implements OpenBrowser {
-
- private final Properties props;
-
- private final static String UNIX_PATH = "htmlview";
- private final static String MAC_PATH = "open";
- private final static String WIN_PATH = "rundll32
url.dll,FileProtocolHandler";
-
- public OpenBrowserImpl(CyProperty<Properties> cyProps) {
- if ( cyProps == null )
- throw new NullPointerException("Properties is null");
- this.props = cyProps.getProperties();
- }
-
- /**
- * DOCUMENT ME!
- *
- * @param url DOCUMENT ME!
- */
- public void openURL(String url) {
- String defBrowser =
props.getProperty(OpenBrowser.DEF_WEB_BROWSER_PROP_NAME);
- String osName = System.getProperty("os.name");
-
- try {
- String cmd;
-
- if (osName.startsWith("Windows")) {
- cmd = WIN_PATH + " " + url;
- } else if (osName.startsWith("Mac")) {
- cmd = MAC_PATH + " " + url;
- } else {
- if (defBrowser != null &&
!defBrowser.equals("")) {
- cmd = defBrowser + " " + url;
- } else {
- cmd = UNIX_PATH + " " + url;
- }
- }
-
- System.out.println("Opening URL by command \"" + cmd +
"\"");
-
- Process p = Runtime.getRuntime().exec(cmd);
-
- try {
- int exitCode = p.waitFor();
-
- if (exitCode != 0)
- System.err.println("Open browser
command (" + cmd + ") failed!");
-
- } catch (InterruptedException ex) {
- ex.printStackTrace();
- }
- } catch (IOException ioe) {
- ioe.printStackTrace();
- }
- }
-}
Modified:
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/view/help/HelpContactHelpDeskTask.java
===================================================================
---
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/view/help/HelpContactHelpDeskTask.java
2010-11-15 19:27:50 UTC (rev 22847)
+++
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/view/help/HelpContactHelpDeskTask.java
2010-11-15 19:50:28 UTC (rev 22848)
@@ -30,7 +30,7 @@
package org.cytoscape.internal.view.help;
-import org.cytoscape.application.swing.util.OpenBrowser;
+import org.cytoscape.util.swing.OpenBrowser;
import org.cytoscape.work.AbstractTask;
import org.cytoscape.work.TaskMonitor;
Modified:
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/view/help/HelpContactHelpDeskTaskFactory.java
===================================================================
---
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/view/help/HelpContactHelpDeskTaskFactory.java
2010-11-15 19:27:50 UTC (rev 22847)
+++
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/view/help/HelpContactHelpDeskTaskFactory.java
2010-11-15 19:50:28 UTC (rev 22848)
@@ -30,7 +30,7 @@
package org.cytoscape.internal.view.help;
-import org.cytoscape.application.swing.util.OpenBrowser;
+import org.cytoscape.util.swing.OpenBrowser;
import org.cytoscape.work.TaskFactory;
import org.cytoscape.work.TaskIterator;
Modified:
core3/swing-application-impl/trunk/src/main/resources/META-INF/spring/bundle-context-osgi.xml
===================================================================
---
core3/swing-application-impl/trunk/src/main/resources/META-INF/spring/bundle-context-osgi.xml
2010-11-15 19:27:50 UTC (rev 22847)
+++
core3/swing-application-impl/trunk/src/main/resources/META-INF/spring/bundle-context-osgi.xml
2010-11-15 19:50:28 UTC (rev 22848)
@@ -86,9 +86,6 @@
<!-- </osgi:service> -->
- <osgi:service id="openBrowserService" ref="openBrowser"
- interface="org.cytoscape.util.OpenBrowser" />
-
<!-- <osgi:service id="printActionService" ref="printAction"
interface="cytoscape.view.CyAction"
/> -->
<osgi:service id="exitActionService" ref="exitAction"
Modified:
core3/swing-application-impl/trunk/src/main/resources/META-INF/spring/bundle-context.xml
===================================================================
---
core3/swing-application-impl/trunk/src/main/resources/META-INF/spring/bundle-context.xml
2010-11-15 19:27:50 UTC (rev 22847)
+++
core3/swing-application-impl/trunk/src/main/resources/META-INF/spring/bundle-context.xml
2010-11-15 19:50:28 UTC (rev 22848)
@@ -33,9 +33,7 @@
<!-- Various Utilities -->
- <bean name="openBrowser"
class="org.cytoscape.internal.util.OpenBrowserImpl">
- <constructor-arg ref="cytoscapePropertiesServiceRef" />
- </bean>
+
<bean name="cyOperatingContext"
class="org.cytoscape.internal.CyOperatingContextImpl">
<constructor-arg ref="cytoscapePropertiesServiceRef" />
</bean>
Modified: core3/swing-util/trunk/pom.xml
===================================================================
--- core3/swing-util/trunk/pom.xml 2010-11-15 19:27:50 UTC (rev 22847)
+++ core3/swing-util/trunk/pom.xml 2010-11-15 19:50:28 UTC (rev 22848)
@@ -109,6 +109,11 @@
<version>4.4</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.cytoscape</groupId>
+ <artifactId>property-api</artifactId>
+ <version>3.0.0-alpha1</version>
+ </dependency>
</dependencies>
</project>
Copied:
core3/swing-util/trunk/src/main/java/org/cytoscape/util/swing/OpenBrowser.java
(from rev 22844,
core3/swing-application-api/trunk/src/main/java/org/cytoscape/application/swing/util/OpenBrowser.java)
===================================================================
---
core3/swing-util/trunk/src/main/java/org/cytoscape/util/swing/OpenBrowser.java
(rev 0)
+++
core3/swing-util/trunk/src/main/java/org/cytoscape/util/swing/OpenBrowser.java
2010-11-15 19:50:28 UTC (rev 22848)
@@ -0,0 +1,61 @@
+
+/*
+ File: OpenBrowser.java
+
+ Copyright (c) 2006, The Cytoscape Consortium (www.cytoscape.org)
+
+ The Cytoscape Consortium is:
+ - Institute for Systems Biology
+ - University of California San Diego
+ - Memorial Sloan-Kettering Cancer Center
+ - Institut Pasteur
+ - Agilent Technologies
+
+ This library is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2.1 of the License, or
+ any later version.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF
+ MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. The software and
+ documentation provided hereunder is on an "as is" basis, and the
+ Institute for Systems Biology and the Whitehead Institute
+ have no obligations to provide maintenance, support,
+ updates, enhancements or modifications. In no event shall the
+ Institute for Systems Biology and the Whitehead Institute
+ be liable to any party for direct, indirect, special,
+ incidental or consequential damages, including lost profits, arising
+ out of the use of this software and its documentation, even if the
+ Institute for Systems Biology and the Whitehead Institute
+ have been advised of the possibility of such damage. See
+ the GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+*/
+
+package org.cytoscape.util.swing;
+
+
+/**
+ * A utility provided as an OSGi service for opening
+ * a web browser. The Cytoscape property "defaultWebBrowser"
+ * may be set with an alternative command for opening
+ * a different web browser than default.
+ */
+public interface OpenBrowser {
+
+ /**
+ * The name of a property for a Properties object used to define an
alternative
+ * web browser command.
+ */
+ String DEF_WEB_BROWSER_PROP_NAME = "defaultWebBrowser";
+
+ /**
+ * Opens a web browser pointing to the specified URL.
+ * @param url A string URL that should be opened in the web browser.
+ */
+ void openURL(String url);
+}
Copied:
core3/swing-util/trunk/src/main/java/org/cytoscape/util/swing/internal/OpenBrowserImpl.java
(from rev 22842,
core3/swing-application-impl/trunk/src/main/java/org/cytoscape/internal/util/OpenBrowserImpl.java)
===================================================================
---
core3/swing-util/trunk/src/main/java/org/cytoscape/util/swing/internal/OpenBrowserImpl.java
(rev 0)
+++
core3/swing-util/trunk/src/main/java/org/cytoscape/util/swing/internal/OpenBrowserImpl.java
2010-11-15 19:50:28 UTC (rev 22848)
@@ -0,0 +1,107 @@
+/*
+ File: OpenBrowserImpl.java
+
+ Copyright (c) 2006, The Cytoscape Consortium (www.cytoscape.org)
+
+ The Cytoscape Consortium is:
+ - Institute for Systems Biology
+ - University of California San Diego
+ - Memorial Sloan-Kettering Cancer Center
+ - Institut Pasteur
+ - Agilent Technologies
+
+ This library is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2.1 of the License, or
+ any later version.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF
+ MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. The software and
+ documentation provided hereunder is on an "as is" basis, and the
+ Institute for Systems Biology and the Whitehead Institute
+ have no obligations to provide maintenance, support,
+ updates, enhancements or modifications. In no event shall the
+ Institute for Systems Biology and the Whitehead Institute
+ be liable to any party for direct, indirect, special,
+ incidental or consequential damages, including lost profits, arising
+ out of the use of this software and its documentation, even if the
+ Institute for Systems Biology and the Whitehead Institute
+ have been advised of the possibility of such damage. See
+ the GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+*/
+
+//-------------------------------------------------------------------------
+// $Revision: 13206 $
+// $Date: 2008-02-26 16:37:29 -0800 (Tue, 26 Feb 2008) $
+// $Author: kono $
+//-------------------------------------------------------------------------
+package org.cytoscape.util.swing.internal;
+
+
+import java.io.IOException;
+import java.util.Properties;
+
+import org.cytoscape.property.CyProperty;
+import org.cytoscape.util.swing.OpenBrowser;
+
+public class OpenBrowserImpl implements OpenBrowser {
+
+ private final Properties props;
+
+ private final static String UNIX_PATH = "htmlview";
+ private final static String MAC_PATH = "open";
+ private final static String WIN_PATH = "rundll32
url.dll,FileProtocolHandler";
+
+ public OpenBrowserImpl(CyProperty<Properties> cyProps) {
+ if ( cyProps == null )
+ throw new NullPointerException("Properties is null");
+ this.props = cyProps.getProperties();
+ }
+
+ /**
+ * DOCUMENT ME!
+ *
+ * @param url DOCUMENT ME!
+ */
+ public void openURL(String url) {
+ String defBrowser =
props.getProperty(OpenBrowser.DEF_WEB_BROWSER_PROP_NAME);
+ String osName = System.getProperty("os.name");
+
+ try {
+ String cmd;
+
+ if (osName.startsWith("Windows")) {
+ cmd = WIN_PATH + " " + url;
+ } else if (osName.startsWith("Mac")) {
+ cmd = MAC_PATH + " " + url;
+ } else {
+ if (defBrowser != null &&
!defBrowser.equals("")) {
+ cmd = defBrowser + " " + url;
+ } else {
+ cmd = UNIX_PATH + " " + url;
+ }
+ }
+
+ System.out.println("Opening URL by command \"" + cmd +
"\"");
+
+ Process p = Runtime.getRuntime().exec(cmd);
+
+ try {
+ int exitCode = p.waitFor();
+
+ if (exitCode != 0)
+ System.err.println("Open browser
command (" + cmd + ") failed!");
+
+ } catch (InterruptedException ex) {
+ ex.printStackTrace();
+ }
+ } catch (IOException ioe) {
+ ioe.printStackTrace();
+ }
+ }
+}
Modified:
core3/swing-util/trunk/src/main/resources/META-INF/spring/bundle-context-osgi.xml
===================================================================
---
core3/swing-util/trunk/src/main/resources/META-INF/spring/bundle-context-osgi.xml
2010-11-15 19:27:50 UTC (rev 22847)
+++
core3/swing-util/trunk/src/main/resources/META-INF/spring/bundle-context-osgi.xml
2010-11-15 19:50:28 UTC (rev 22848)
@@ -5,6 +5,16 @@
http://www.springframework.org/schema/osgi
http://www.springframework.org/schema/osgi/spring-osgi-1.0.xsd"
default-lazy-init="false">
+
+ <osgi:reference id="cytoscapePropertiesServiceRef"
+ interface="org.cytoscape.property.CyProperty"
+ filter="(cyPropertyName=coreSettings)" />
+
<osgi:service id="fileUtilService" ref="fileUtil"
interface="org.cytoscape.util.swing.FileUtil" />
+
+ <osgi:service id="openBrowserService" ref="openBrowser"
+ interface="org.cytoscape.util.swing.OpenBrowser" />
+
+
</beans>
Modified:
core3/swing-util/trunk/src/main/resources/META-INF/spring/bundle-context.xml
===================================================================
---
core3/swing-util/trunk/src/main/resources/META-INF/spring/bundle-context.xml
2010-11-15 19:27:50 UTC (rev 22847)
+++
core3/swing-util/trunk/src/main/resources/META-INF/spring/bundle-context.xml
2010-11-15 19:50:28 UTC (rev 22848)
@@ -23,4 +23,8 @@
<bean name="fileUtil"
class="org.cytoscape.util.swing.internal.FileUtilImpl">
</bean>
+
+ <bean name="openBrowser"
class="org.cytoscape.util.swing.internal.OpenBrowserImpl">
+ <constructor-arg ref="cytoscapePropertiesServiceRef" />
+ </bean>
</beans>
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.