Skip to Content.
Sympa Menu

notify-dpml - svn commit: r2055 - development/laboratory/ide/eclipse/magic/plugin/src/net/dpml/ide/eclipse/plugins/magic

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: peter AT neubauer.se
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r2055 - development/laboratory/ide/eclipse/magic/plugin/src/net/dpml/ide/eclipse/plugins/magic
  • Date: Sun, 13 Mar 2005 20:30:53 -0500

Author: peter AT neubauer.se
Date: Sun Mar 13 20:30:53 2005
New Revision: 2055

Modified:

development/laboratory/ide/eclipse/magic/plugin/src/net/dpml/ide/eclipse/plugins/magic/IndexActionDelegate.java

development/laboratory/ide/eclipse/magic/plugin/src/net/dpml/ide/eclipse/plugins/magic/MagicContainer.java
Log:
a bit more error handling


Modified:
development/laboratory/ide/eclipse/magic/plugin/src/net/dpml/ide/eclipse/plugins/magic/IndexActionDelegate.java
==============================================================================
---
development/laboratory/ide/eclipse/magic/plugin/src/net/dpml/ide/eclipse/plugins/magic/IndexActionDelegate.java
(original)
+++
development/laboratory/ide/eclipse/magic/plugin/src/net/dpml/ide/eclipse/plugins/magic/IndexActionDelegate.java
Sun Mar 13 20:30:53 2005
@@ -9,7 +9,6 @@
import java.util.Iterator;
import java.util.List;
import java.util.TreeMap;
-import java.util.prefs.Preferences;

import net.dpml.ide.common.magic.IdeIndex;
import net.dpml.ide.common.magic.IdeProjectDefinition;
@@ -41,7 +40,6 @@
import org.eclipse.ui.IObjectActionDelegate;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.actions.SelectionListenerAction;
-import org.eclipse.ui.internal.Workbench;
import org.osgi.service.prefs.BackingStoreException;



Modified:
development/laboratory/ide/eclipse/magic/plugin/src/net/dpml/ide/eclipse/plugins/magic/MagicContainer.java
==============================================================================
---
development/laboratory/ide/eclipse/magic/plugin/src/net/dpml/ide/eclipse/plugins/magic/MagicContainer.java
(original)
+++
development/laboratory/ide/eclipse/magic/plugin/src/net/dpml/ide/eclipse/plugins/magic/MagicContainer.java
Sun Mar 13 20:30:53 2005
@@ -73,7 +73,16 @@
return;
}
proj =
ResourcesPlugin.getWorkspace().getRoot().getProject(project.getElementName());
- getIndexFile();
+ try
+ {
+ getIndexFile();
+ }
+ catch ( Exception e )
+ {
+ e.printStackTrace();
+ log.log(new Status(Status.ERROR, "net.dpml.MagicPlugin", 0,
"Could not load index file form the project prefs. try reloading the magic
index again to get it set.", null));
+
+ }
log.log(new Status(Status.INFO, "net.dpml.MagicPlugin", 0,
"Project: " + proj, null));
try
{
@@ -93,7 +102,7 @@



- private void getIndexFile()
+ private void getIndexFile() throws Exception
{
IScopeContext projectScope = new ProjectScope(proj);
IEclipsePreferences projectNode =
projectScope.getNode("net.dpml.magic");
@@ -101,6 +110,10 @@
if (projectNode != null) {
indexPath = projectNode.get("index.path", null);
}
+ else
+ {
+ throw new Exception("could not find index file!");
+ }
if (indexPath!=null)
{
indexFile = proj.getFile(new Path(indexPath));



  • svn commit: r2055 - development/laboratory/ide/eclipse/magic/plugin/src/net/dpml/ide/eclipse/plugins/magic, peter, 03/13/2005

Archive powered by MHonArc 2.6.24.

Top of Page