Author: mculpepper(a)jboss.com
Date: 2007-05-21 19:55:12 -0400 (Mon, 21 May 2007)
New Revision: 2048
Added:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/other/internal/StandaloneExtensionManager.java
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/other/internal/StandalonePreferenceManager.java
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/other/internal/StandaloneVariables.java
Log:
"standalone" implementations of archives core specific interfaces
Added:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/other/internal/StandaloneExtensionManager.java
===================================================================
---
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/other/internal/StandaloneExtensionManager.java
(rev 0)
+++
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/other/internal/StandaloneExtensionManager.java 2007-05-21
23:55:12 UTC (rev 2048)
@@ -0,0 +1,35 @@
+package org.jboss.ide.eclipse.archives.core.model.other.internal;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.jboss.ide.eclipse.archives.core.model.IArchive;
+import org.jboss.ide.eclipse.archives.core.model.IArchiveType;
+import org.jboss.ide.eclipse.archives.core.model.other.IExtensionManager;
+
+public class StandaloneExtensionManager implements IExtensionManager {
+
+ public IArchiveType getArchiveType(String id) {
+ final String typeId = id;
+
+ return new IArchiveType () {
+ public String getId() {
+ return typeId;
+ }
+ public String getLabel() {
+ return typeId;
+ }
+ public IArchive createDefaultConfiguration(String projectName, IProgressMonitor
monitor) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+ public IArchive fillDefaultConfiguration(String projectName, IArchive topLevel,
IProgressMonitor monitor) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+ };
+ }
+
+ public IArchiveType[] getArchiveTypes() {
+ return new IArchiveType[0];
+ }
+
+}
Added:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/other/internal/StandalonePreferenceManager.java
===================================================================
---
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/other/internal/StandalonePreferenceManager.java
(rev 0)
+++
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/other/internal/StandalonePreferenceManager.java 2007-05-21
23:55:12 UTC (rev 2048)
@@ -0,0 +1,28 @@
+package org.jboss.ide.eclipse.archives.core.model.other.internal;
+
+import org.eclipse.core.runtime.IPath;
+import org.jboss.ide.eclipse.archives.core.model.other.IPreferenceManager;
+
+public class StandalonePreferenceManager implements IPreferenceManager {
+
+ public boolean areProjectSpecificPrefsEnabled(IPath path) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean isBuilderEnabled(IPath path) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public void setBuilderEnabled(IPath path, boolean val) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setProjectSpecificPrefsEnabled(IPath path, boolean val) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/other/internal/StandaloneVariables.java
===================================================================
---
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/other/internal/StandaloneVariables.java 2007-05-21
23:54:34 UTC (rev 2047)
+++
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/other/internal/StandaloneVariables.java 2007-05-21
23:55:12 UTC (rev 2048)
@@ -3,22 +3,26 @@
import java.net.URL;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
import org.jboss.ide.eclipse.archives.core.model.other.IRuntimeVariables;
public class StandaloneVariables implements IRuntimeVariables {
public URL getBindingLog4j() {
- // TODO Auto-generated method stub
- return null;
+ return getClass().getClassLoader().getResource("log4j.xml");
}
public URL getBindingSchema() {
- // TODO Auto-generated method stub
- return null;
+ return getClass().getClassLoader().getResource("packages.xsd");
}
- public IPath getWorkspacePath() {
- // TODO Auto-generated method stub
+ public IPath getProjectPath(String projectName) {
+ projectName = projectName.replace(' ', '_');
+
+ String projectPath = System.getProperty(projectName + ".dir");
+ if (projectPath != null)
+ return new Path(projectPath);
+
return null;
}
Show replies by date