Permalink
Browse files

Made sure that no empty .noparse cache-files were created

  • Loading branch information...
1 parent a933e59 commit 3bceb01d17e6f9e68120812cf7f39932b6d112cc @jakobc committed Mar 8, 2013
@@ -42,130 +42,130 @@
* @see ErlangCore#create(org.eclipse.core.resources.IWorkspaceRoot)
*/
public interface IErlModel extends IErlElement, IOpenable, IParent,
- IErlElementLocator {
-
- /**
- * Returns the Erlang project with the given name. This is a handle-only
- * method. The project may or may not exist.
- *
- * @param project
- * the name of the Erlang project
- * @return the Erlang project with the given name
- */
- IErlProject getErlangProject(IProject project);
-
- /**
- * Returns the Erlang projects in this Erlang model, or an empty array if
- * there are none.
- *
- * @return the Erlang projects in this Erlang model, or an empty array if
- * there are none
- * @throws ErlModelException
- * if this request fails.
- */
- Collection<IErlProject> getErlangProjects() throws ErlModelException;
-
- void addModelChangeListener(IErlModelChangeListener listener);
-
- void removeModelChangeListener(IErlModelChangeListener listener);
-
- IErlElement innermostThat(final IErlElement el,
- final Predicate<IErlElement> firstThat);
-
- OtpErlangList getPathVars();
-
- IErlProject newProject(final String name, final String path)
- throws ErlModelException;
-
- void notifyChange(IErlElement element);
-
- /**
- * Returns the Erlang element corresponding to the given file, its project
- * being the given project. Returns <code>null</code> if unable to associate
- * the given file with a Erlang element.
- * <p>
- * The file must be one of:
- * <ul>
- * <li>a <code>.erl</code> file - the element returned is the corresponding
- * <code>IErlModule</code></li>
- * </ul>
- * <p>
- * Creating a Erlang element has the side effect of creating and opening all
- * of the element's parents if they are not yet open.
- */
- IErlElement create(IResource resource);
-
- /**
- * Adds the given listener for changes to Erlang elements. Has no effect if
- * an identical listener is already registered. After completion of this
- * method, the given listener will be registered for exactly the specified
- * events. If they were previously registered for other events, they will be
- * deregistered.
- * <p>
- * Once registered, a listener starts receiving notification of changes to
- * Erlang elements in the model. The listener continues to receive
- * notifications until it is replaced or removed.
- * </p>
- * <p>
- * Listeners can listen for several types of event as defined in
- * <code>ElementChangeEvent</code>. Clients are free to register for any
- * number of event types however if they register for more than one, it is
- * their responsibility to ensure they correctly handle the case where the
- * same Erlang element change shows up in multiple notifications. Clients
- * are guaranteed to receive only the events for which they are registered.
- * </p>
- *
- * @param listener
- * the listener
- * @param eventMask
- * the bit-wise OR of all event types of interest to the listener
- * @see IElementChangedListener
- * @see ElementChangedEvent
- * @see #removeElementChangedListener(IElementChangedListener)
- */
- void addElementChangedListener(IElementChangedListener listener,
- int eventMask);
-
- /**
- * Removes the given element changed listener. Has no affect if an identical
- * listener is not registered.
- *
- * @param listener
- * the listener
- */
- void removeElementChangedListener(IElementChangedListener listener);
-
- /**
- * Adds the given listener for changes to Erlang elements. Has no effect if
- * an identical listener is already registered.
- *
- * This listener will only be notified during the POST_CHANGE resource
- * change notification and any reconcile operation (POST_RECONCILE). For
- * finer control of the notification, use
- * <code>addElementChangedListener(IElementChangedListener,int)</code>,
- * which allows to specify a different eventMask.
- *
- * @param listener
- * the listener
- * @see ElementChangedEvent
- */
- void addElementChangedListener(IElementChangedListener listener);
-
- void registerModelDelta(IErlElementDelta delta);
-
- IErlModule getModuleFromFile(IParent parent, String name,
- String initialText, String path, String key);
-
- IErlModule getModuleFromText(IParent parent, String name,
- String initialText, String key);
-
- public void removeModule(final IErlModule module);
-
- void putEdited(String path, IErlModule module);
-
- IErlParser getParser();
-
- ErlangToolkit getToolkit();
-
- Object getModelLock();
+ IErlElementLocator {
+
+ /**
+ * Returns the Erlang project with the given name. This is a handle-only
+ * method. The project may or may not exist.
+ *
+ * @param project
+ * the name of the Erlang project
+ * @return the Erlang project with the given name
+ */
+ IErlProject getErlangProject(IProject project);
+
+ /**
+ * Returns the Erlang projects in this Erlang model, or an empty array if
+ * there are none.
+ *
+ * @return the Erlang projects in this Erlang model, or an empty array if
+ * there are none
+ * @throws ErlModelException
+ * if this request fails.
+ */
+ Collection<IErlProject> getErlangProjects() throws ErlModelException;
+
+ void addModelChangeListener(IErlModelChangeListener listener);
+
+ void removeModelChangeListener(IErlModelChangeListener listener);
+
+ IErlElement innermostThat(final IErlElement el,
+ final Predicate<IErlElement> firstThat);
+
+ OtpErlangList getPathVars();
+
+ IErlProject newProject(final String name, final String path)
+ throws ErlModelException;
+
+ void notifyChange(IErlElement element);
+
+ /**
+ * Returns the Erlang element corresponding to the given file, its project
+ * being the given project. Returns <code>null</code> if unable to associate
+ * the given file with a Erlang element.
+ * <p>
+ * The file must be one of:
+ * <ul>
+ * <li>a <code>.erl</code> file - the element returned is the corresponding
+ * <code>IErlModule</code></li>
+ * </ul>
+ * <p>
+ * Creating a Erlang element has the side effect of creating and opening all
+ * of the element's parents if they are not yet open.
+ */
+ IErlElement create(IResource resource);
+
+ /**
+ * Adds the given listener for changes to Erlang elements. Has no effect if
+ * an identical listener is already registered. After completion of this
+ * method, the given listener will be registered for exactly the specified
+ * events. If they were previously registered for other events, they will be
+ * deregistered.
+ * <p>
+ * Once registered, a listener starts receiving notification of changes to
+ * Erlang elements in the model. The listener continues to receive
+ * notifications until it is replaced or removed.
+ * </p>
+ * <p>
+ * Listeners can listen for several types of event as defined in
+ * <code>ElementChangeEvent</code>. Clients are free to register for any
+ * number of event types however if they register for more than one, it is
+ * their responsibility to ensure they correctly handle the case where the
+ * same Erlang element change shows up in multiple notifications. Clients
+ * are guaranteed to receive only the events for which they are registered.
+ * </p>
+ *
+ * @param listener
+ * the listener
+ * @param eventMask
+ * the bit-wise OR of all event types of interest to the listener
+ * @see IElementChangedListener
+ * @see ElementChangedEvent
+ * @see #removeElementChangedListener(IElementChangedListener)
+ */
+ void addElementChangedListener(IElementChangedListener listener,
+ int eventMask);
+
+ /**
+ * Removes the given element changed listener. Has no affect if an identical
+ * listener is not registered.
+ *
+ * @param listener
+ * the listener
+ */
+ void removeElementChangedListener(IElementChangedListener listener);
+
+ /**
+ * Adds the given listener for changes to Erlang elements. Has no effect if
+ * an identical listener is already registered.
+ *
+ * This listener will only be notified during the POST_CHANGE resource
+ * change notification and any reconcile operation (POST_RECONCILE). For
+ * finer control of the notification, use
+ * <code>addElementChangedListener(IElementChangedListener,int)</code>,
+ * which allows to specify a different eventMask.
+ *
+ * @param listener
+ * the listener
+ * @see ElementChangedEvent
+ */
+ void addElementChangedListener(IElementChangedListener listener);
+
+ void registerModelDelta(IErlElementDelta delta);
+
+ IErlModule getModuleFromFile(IParent parent, String name, String path,
+ String encoding, String key);
+
+ IErlModule getModuleFromText(IParent parent, String name,
+ String initialText, String key);
+
+ public void removeModule(final IErlModule module);
+
+ void putEdited(String path, IErlModule module);
+
+ IErlParser getParser();
+
+ ErlangToolkit getToolkit();
+
+ Object getModelLock();
}
@@ -52,8 +52,8 @@ protected boolean buildStructure(final IProgressMonitor pm)
final List<IErlModule> children = Lists
.newArrayListWithCapacity(files.size());
for (final String file : files) {
- children.add(new ErlModule(this, getName(file), null, null,
- file));
+ children.add(new ErlModule(this, getName(file), file, null,
+ null));
}
setChildren(children);
return true;
Oops, something went wrong.

0 comments on commit 3bceb01

Please sign in to comment.