This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 363060 - [Annotation] Proxies are not handled properly when artifacts are retrieved from ArtifactManager
Summary: [Annotation] Proxies are not handled properly when artifacts are retrieved fr...
Status: CLOSED FIXED
Alias: None
Product: Tigerstripe (Archived)
Classification: Technology
Component: Annotations (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 critical (vote)
Target Milestone: 0.5M0   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-07 11:12 EST by Navid Mehregani CLA
Modified: 2011-11-09 10:51 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Navid Mehregani CLA 2011-11-07 11:12:56 EST
Build Identifier: 

This defect has already been resolved.  The bugzilla is being filed for the purpose of code review.  Here are the modified files:

plugins/org.eclipse.tigerstripe.workbench.ui.visualeditor.diagram/src/org/eclipse/tigerstripe/workbench/ui/visualeditor/diagram/part/TSRemoveFromModelAction.java
	1.44	plugins/org.eclipse.tigerstripe.annotation.core/src/org/eclipse/tigerstripe/annotation/internal/core/AnnotationManager.java
	1.1	plugins/org.eclipse.tigerstripe.annotation.core/src/org/eclipse/tigerstripe/annotation/internal/core/SimpleLock.java
	1.1	plugins/org.eclipse.tigerstripe.workbench.base/src/java/org/eclipse/tigerstripe/workbench/Contextual.java
	1.24	plugins/org.eclipse.tigerstripe.workbench.base/src/java/org/eclipse/tigerstripe/workbench/internal/api/impl/ArtifactManagerSessionImpl.java
	1.32	plugins/org.eclipse.tigerstripe.workbench.base/src/java/org/eclipse/tigerstripe/workbench/internal/api/impl/TigerstripeProjectHandle.java
	1.58	plugins/org.eclipse.tigerstripe.workbench.base/src/java/org/eclipse/tigerstripe/workbench/internal/core/model/ArtifactManager.java
	1.1	plugins/org.eclipse.tigerstripe.workbench.base/src/java/org/eclipse/tigerstripe/workbench/internal/core/model/ArtifactManagerImpl.java
	1.11	plugins/org.eclipse.tigerstripe.workbench.base/src/java/org/eclipse/tigerstripe/workbench/internal/core/model/ContextProjectAwareProxy.java
	1.1	plugins/org.eclipse.tigerstripe.workbench.base/src/java/org/eclipse/tigerstripe/workbench/internal/core/model/ContextualArtifactManager.java
	1.1	plugins/org.eclipse.tigerstripe.workbench.base/src/java/org/eclipse/tigerstripe/workbench/internal/core/model/WrapHelper.java
	1.8	plugins/org.eclipse.tigerstripe.workbench.base/src/java/org/eclipse/tigerstripe/workbench/internal/core/module/ModuleArtifactManager.java
	1.1	plugins/org.eclipse.tigerstripe.workbench.base/src/java/org/eclipse/tigerstripe/workbench/model/deprecated_/ContextualManagerSession.java
	1.13	plugins/org.eclipse.tigerstripe.workbench.base/src/java/org/eclipse/tigerstripe/workbench/model/deprecated_/IModelComponent.java
	1.1	plugins/org.eclipse.tigerstripe.workbench.base/src/java/org/eclipse/tigerstripe/workbench/project/ContextualModelProject.java

Reproducible: Always
Comment 1 Navid Mehregani CLA 2011-11-09 10:51:02 EST
Code review was completed on November 9 2011.  Major changes are noted below:

 ArtifactManager has been split between an interface and implementation classes. ArtifactManager is now an interface with the following implementations: ArtifactManagerImpl (Same as what ArtifactManager looked like before) and ContextualArtifactManager (New class, which wraps all objects into proxy objects).

  ContextualModelProject is new and implements ITigerstripeModelProject.  It's used to return a "proxy-aware" version of artifact manager (i.e. ContextualArtifactManager).

  WrapHelper class is used by ContextualArtifactManager to wrap objects in ContextProjectAwareProxy objects

  ContextualModelProject and ContextualArtifactManager objects are returned by "invoke" method of ContextProjectAwareProxy.  There is a Contextual annotation added to indicate which methods should return these objects.  The annotation is read by ContextProjectAwareProxy.