Skip to content
Snippets Groups Projects
Commit d5cec44d authored by Daniel Ratiu's avatar Daniel Ratiu
Browse files

Another review iteration.

parent 0ea8e469
No related branches found
No related tags found
No related merge requests found
Showing
with 32 additions and 16 deletions
...@@ -26,7 +26,7 @@ import org.osgi.framework.BundleContext; ...@@ -26,7 +26,7 @@ import org.osgi.framework.BundleContext;
* @author hoelzl * @author hoelzl
* @author $Author$ * @author $Author$
* @version $Rev$ * @version $Rev$
* @ConQAT.Rating YELLOW Hash: DB241126336AD7DDFEF835CC72703F1E * @ConQAT.Rating GREEN Hash: BE5981AF550CF440C98D0CEB5CBBC5CF
*/ */
public class ToolingKernelActivator extends Plugin { public class ToolingKernelActivator extends Plugin {
......
...@@ -27,6 +27,9 @@ import org.fortiss.tooling.kernel.internal.storage.eclipse.EclipseResourceStorag ...@@ -27,6 +27,9 @@ import org.fortiss.tooling.kernel.internal.storage.eclipse.EclipseResourceStorag
* built above the kernel is required to decide whether the file provided with * built above the kernel is required to decide whether the file provided with
* {@link #isStorageLocation(IFile)} should be considered. * {@link #isStorageLocation(IFile)} should be considered.
* *
* @TODO: who implements this interface? (I could not find any class - is this a
* dead code?)
*
* @author hoelzlf * @author hoelzlf
* @author $Author$ * @author $Author$
* @version $Rev$ * @version $Rev$
......
...@@ -29,7 +29,7 @@ package org.fortiss.tooling.kernel.interfaces; ...@@ -29,7 +29,7 @@ package org.fortiss.tooling.kernel.interfaces;
* @author hoelzl * @author hoelzl
* @author $Author$ * @author $Author$
* @version $Rev$ * @version $Rev$
* @ConQAT.Rating YELLOW Hash: 4C3F8D3097CB3379B1AA27B6A0BC05DE * @ConQAT.Rating GREEN Hash: 23C121BA36B5BBC85B457B0195BB5647
*/ */
public interface IElementCompositionContext { public interface IElementCompositionContext {
// this is just a marker interface // this is just a marker interface
......
...@@ -35,7 +35,7 @@ import org.fortiss.tooling.kernel.services.IPrototypeService.Prototype; ...@@ -35,7 +35,7 @@ import org.fortiss.tooling.kernel.services.IPrototypeService.Prototype;
* @author hoelzl * @author hoelzl
* @author $Author$ * @author $Author$
* @version $Rev$ * @version $Rev$
* @ConQAT.Rating YELLOW Hash: 4073D9D3263D0123CD583E9636EE101D * @ConQAT.Rating GREEN Hash: 55AAA8CFC923138D7FC62924B1FD5208
*/ */
public interface IElementCompositor<C extends EObject> extends IEObjectAware<C> { public interface IElementCompositor<C extends EObject> extends IEObjectAware<C> {
/** /**
......
...@@ -31,7 +31,7 @@ import org.fortiss.tooling.kernel.services.IPrototypeService.Prototype; ...@@ -31,7 +31,7 @@ import org.fortiss.tooling.kernel.services.IPrototypeService.Prototype;
* @author hoelzl * @author hoelzl
* @author $Author$ * @author $Author$
* @version $Rev$ * @version $Rev$
* @ConQAT.Rating YELLOW Hash: 1160E8FBB539CAEA58CB178AF41E5ED2 * @ConQAT.Rating GREEN Hash: B9EFDFBB6757268CE263BDB325ADF72B
*/ */
public interface IPrototypeProvider { public interface IPrototypeProvider {
......
...@@ -30,7 +30,7 @@ import java.util.List; ...@@ -30,7 +30,7 @@ import java.util.List;
* @author hoelzl * @author hoelzl
* @author $Author$ * @author $Author$
* @version $Rev$ * @version $Rev$
* @ConQAT.Rating YELLOW Hash: 94E6ACB100AAF673434E0A0F9B548357 * @ConQAT.Rating GREEN Hash: E87A345ADBF36DD5D10D19765D45CB31
*/ */
public interface IStorageProvider { public interface IStorageProvider {
......
...@@ -24,7 +24,7 @@ package org.fortiss.tooling.kernel.interfaces; ...@@ -24,7 +24,7 @@ package org.fortiss.tooling.kernel.interfaces;
* @author hoelzl * @author hoelzl
* @author $Author$ * @author $Author$
* @version $Rev$ * @version $Rev$
* @ConQAT.Rating YELLOW Hash: 47E5580127F52AD1A331B4E01D385128 * @ConQAT.Rating GREEN Hash: 42C58F24583661CF28BB783416B2805E
*/ */
public interface ITopLevelElementChangeListener { public interface ITopLevelElementChangeListener {
......
...@@ -37,10 +37,12 @@ import org.eclipse.emf.ecore.EObject; ...@@ -37,10 +37,12 @@ import org.eclipse.emf.ecore.EObject;
*/ */
public interface ITopLevelElementContext { public interface ITopLevelElementContext {
// @TODO: shouldn't we use a ProgressMonitor as well? (like saving, loading
// can be potentially slow)
/** Returns the top-level model element represented by this context. */ /** Returns the top-level model element represented by this context. */
EObject getTopLevelElement(); EObject getTopLevelElement();
/** Executes the given {@link Runnable} as model changing command-. */ /** Executes the given {@link Runnable} as model changing command. */
void runAsCommand(Runnable runner); void runAsCommand(Runnable runner);
/** Adds a command stack listener. */ /** Adds a command stack listener. */
......
...@@ -5,4 +5,8 @@ ...@@ -5,4 +5,8 @@
--> -->
<body> <body>
Interface definitions for extension classes of kernel extension points. Interface definitions for extension classes of kernel extension points.
@TODO: are the interfaces from this package needed only for extension points? -
it seems that there are also other interfaces -- e.g. ITopLevelElementChangeListener
that have nothing to do with extension points.
</body> </body>
...@@ -32,7 +32,7 @@ import org.fortiss.tooling.kernel.util.LoggingUtils; ...@@ -32,7 +32,7 @@ import org.fortiss.tooling.kernel.util.LoggingUtils;
* @author hoelzl * @author hoelzl
* @author $Author$ * @author $Author$
* @version $Rev$ * @version $Rev$
* @ConQAT.Rating YELLOW Hash: 24589AA882EB757183F8EB940CF778D0 * @ConQAT.Rating GREEN Hash: 9D56A2E364F6199C6CAE194DFA9AB5AE
*/ */
public class CommandStackService implements ICommandStackService { public class CommandStackService implements ICommandStackService {
/** {@inheritDoc} */ /** {@inheritDoc} */
......
...@@ -31,7 +31,7 @@ import org.fortiss.tooling.kernel.services.IConnectionCompositorService; ...@@ -31,7 +31,7 @@ import org.fortiss.tooling.kernel.services.IConnectionCompositorService;
* @author hoelzl * @author hoelzl
* @author $Author$ * @author $Author$
* @version $Rev$ * @version $Rev$
* @ConQAT.Rating YELLOW Hash: E03DE566919A836263949B2899453A61 * @ConQAT.Rating GREEN Hash: 91DC9881CCEA9F0C1EEBF5128E9FCB3C
*/ */
public class ConnectionCompositorService public class ConnectionCompositorService
extends extends
......
...@@ -32,7 +32,7 @@ import org.fortiss.tooling.kernel.services.IPrototypeService.Prototype; ...@@ -32,7 +32,7 @@ import org.fortiss.tooling.kernel.services.IPrototypeService.Prototype;
* @author hoelzl * @author hoelzl
* @author $Author$ * @author $Author$
* @version $Rev$ * @version $Rev$
* @ConQAT.Rating YELLOW Hash: E27B124C6AC4A10B7A8C04949A8BFF86 * @ConQAT.Rating GREEN Hash: 090065A55A0C7D76FEDE97D75C459D01
*/ */
public final class ElementCompositorService extends public final class ElementCompositorService extends
EObjectAwareServiceBase<IElementCompositor<EObject>> implements EObjectAwareServiceBase<IElementCompositor<EObject>> implements
......
...@@ -46,7 +46,7 @@ import org.osgi.framework.Bundle; ...@@ -46,7 +46,7 @@ import org.osgi.framework.Bundle;
* @author hoelzl * @author hoelzl
* @author $Author$ * @author $Author$
* @version $Rev$ * @version $Rev$
* @ConQAT.Rating YELLOW Hash: D6F9583647E210E21463E15ECC7E6334 * @ConQAT.Rating GREEN Hash: 92CEC917582981B1AD7A906AF31D5BE0
*/ */
public class PersistencyService implements IPersistencyService { public class PersistencyService implements IPersistencyService {
......
...@@ -39,7 +39,7 @@ import org.osgi.framework.Bundle; ...@@ -39,7 +39,7 @@ import org.osgi.framework.Bundle;
* @author hoelzl * @author hoelzl
* @author $Author$ * @author $Author$
* @version $Rev$ * @version $Rev$
* @ConQAT.Rating YELLOW Hash: E67EFFAA3034D8BFA1A2E2C673CA5811 * @ConQAT.Rating GREEN Hash: 267402CC6D535D379628A4A85CCF7F1F
*/ */
public class PrototypeService implements IPrototypeService { public class PrototypeService implements IPrototypeService {
......
<!-- <!--
$Id$ $Id$
@version $Rev$ @version $Rev$
@ConQAT.Rating YELLOW Hash: 9EF9DAA1FC3C08A44EC8946A0CFB9ABC @ConQAT.Rating GREEN Hash: 9FBEA96965AF718EB00560E14DB6D4FB
--> -->
<body> <body>
Implementations of the kernel services defined in the <code>kernel.services</code> package. Implementations of the kernel services defined in the <code>kernel.services</code> package.
......
...@@ -34,7 +34,7 @@ import org.eclipse.emf.transaction.TransactionalEditingDomain; ...@@ -34,7 +34,7 @@ import org.eclipse.emf.transaction.TransactionalEditingDomain;
* @author hummel * @author hummel
* @author $Author$ * @author $Author$
* @version $Rev$ * @version $Rev$
* @ConQAT.Rating YELLOW Hash: AFB8CA71F5FD955F7EFC6113A7A59A0F * @ConQAT.Rating GREEN Hash: 36DC8E77AF147ABB387E3447588E997D
*/ */
public class AutoUndoCommandStack implements TransactionalCommandStack { public class AutoUndoCommandStack implements TransactionalCommandStack {
......
...@@ -116,6 +116,10 @@ public class EMFTransactionalCommand implements Command { ...@@ -116,6 +116,10 @@ public class EMFTransactionalCommand implements Command {
} catch (RollbackException e) { } catch (RollbackException e) {
// There is nothing we can do about. // There is nothing we can do about.
// Maybe it even was intended, so ignore. // Maybe it even was intended, so ignore.
// @TODO: fail silently is a bad programming style since
// there are errors that are from outside not seen. Print a
// stacktrace should be the minimum what we do for an
// exception
} }
} else { } else {
LoggingUtils.log(ToolingKernelActivator.getDefault(), LoggingUtils.log(ToolingKernelActivator.getDefault(),
......
...@@ -147,6 +147,8 @@ public class EclipseResourceStorageProvider implements IResourceChangeListener, ...@@ -147,6 +147,8 @@ public class EclipseResourceStorageProvider implements IResourceChangeListener,
public boolean visit(IResourceDelta delta) { public boolean visit(IResourceDelta delta) {
if (delta.getResource() instanceof IFile if (delta.getResource() instanceof IFile
&& delta.getResource().getParent() instanceof IProject && delta.getResource().getParent() instanceof IProject
// @TODO: is it OK to hardcode the extension "af3_20" here? -
// use better a constant
&& delta.getResource().getFileExtension().equals("af3_20")) { && delta.getResource().getFileExtension().equals("af3_20")) {
runWorkspaceChangeJob((IFile) delta.getResource(), delta.getKind()); runWorkspaceChangeJob((IFile) delta.getResource(), delta.getKind());
} }
...@@ -212,6 +214,7 @@ public class EclipseResourceStorageProvider implements IResourceChangeListener, ...@@ -212,6 +214,7 @@ public class EclipseResourceStorageProvider implements IResourceChangeListener,
return mc; return mc;
} }
// @TODO: comment is bad: copied from loadContext
/** Loads a file and creates a new context from its contents. */ /** Loads a file and creates a new context from its contents. */
private void unloadContext(IFile file) { private void unloadContext(IFile file) {
ModelContext context = loadedContexts.remove(file); ModelContext context = loadedContexts.remove(file);
......
...@@ -31,7 +31,7 @@ import org.fortiss.tooling.kernel.internal.CommandStackService; ...@@ -31,7 +31,7 @@ import org.fortiss.tooling.kernel.internal.CommandStackService;
* @author hoelzl * @author hoelzl
* @author $Author$ * @author $Author$
* @version $Rev$ * @version $Rev$
* @ConQAT.Rating YELLOW Hash: CCF7573F1C48CF4CFFD1464C4498F56F * @ConQAT.Rating GREEN Hash: 0673CEE9D531862ED2BEB34AFCB77AED
*/ */
public interface ICommandStackService { public interface ICommandStackService {
......
...@@ -37,7 +37,7 @@ import org.fortiss.tooling.kernel.internal.ConnectionCompositorService; ...@@ -37,7 +37,7 @@ import org.fortiss.tooling.kernel.internal.ConnectionCompositorService;
* @author hoelzl * @author hoelzl
* @author $Author$ * @author $Author$
* @version $Rev$ * @version $Rev$
* @ConQAT.Rating YELLOW Hash: E9F9052783770B8F9494E84F990874BD * @ConQAT.Rating GREEN Hash: EBFA052BA702812ED4FD5C17ED8F709B
*/ */
public interface IConnectionCompositorService { public interface IConnectionCompositorService {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment