Browse files

extract IBeamLocator

  • Loading branch information...
1 parent 1b6b48f commit 3b1b8ef1d5c3afefa63709c79f0d7b604932930e @vladdu vladdu committed Mar 29, 2012
View
8 org.erlide.core/src/org/erlide/backend/BackendData.java
@@ -34,9 +34,9 @@
import org.erlide.backend.runtimeinfo.RuntimeInfoManager;
import org.erlide.core.model.erlang.ModuleKind;
import org.erlide.jinterface.ErlLogger;
-import org.erlide.launch.BeamLocator;
import org.erlide.launch.ErlLaunchAttributes;
import org.erlide.launch.ErlangLaunchDelegate;
+import org.erlide.launch.IBeamLocator;
import org.erlide.launch.debug.ErlDebugConstants;
import org.erlide.utils.SystemUtils;
@@ -47,7 +47,7 @@
public static final String PROJECT_NAME_SEPARATOR = ";";
private RuntimeInfoManager runtimeInfoManager;
- private BeamLocator beamLocator;
+ private IBeamLocator beamLocator;
public BackendData(final RuntimeInfoManager runtimeInfoManager,
final ILaunchConfiguration config, final String mode) {
@@ -330,11 +330,11 @@ public void setAttribute(final String key, final List<String> value) {
config.setAttribute(key, value);
}
- public void setBeamLocator(final BeamLocator beamLocator) {
+ public void setBeamLocator(final IBeamLocator beamLocator) {
this.beamLocator = beamLocator;
}
- public BeamLocator getBeamLocator() {
+ public IBeamLocator getBeamLocator() {
return beamLocator;
}
}
View
3 org.erlide.core/src/org/erlide/launch/BeamLocator.java
@@ -10,8 +10,9 @@
import org.erlide.core.model.root.IErlProject;
import org.erlide.utils.SystemUtils;
-public class BeamLocator {
+public class BeamLocator implements IBeamLocator {
+ @Override
public IFile findModuleBeam(final IProject project, final String module)
throws ErlModelException {
final IErlProject erlProject = ErlModelManager.getErlangModel()
View
12 org.erlide.core/src/org/erlide/launch/IBeamLocator.java
@@ -0,0 +1,12 @@
+package org.erlide.launch;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.erlide.core.model.root.ErlModelException;
+
+public interface IBeamLocator {
+
+ public abstract IFile findModuleBeam(final IProject project,
+ final String module) throws ErlModelException;
+
+}

0 comments on commit 3b1b8ef

Please sign in to comment.