| Summary: | [Facet] Facets are not working as expected | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Technology] Tigerstripe | Reporter: | Navid Mehregani <nmehrega> | ||||
| Component: | Facet | Assignee: | Project Inbox <tigerstripe.facet-inbox> | ||||
| Status: | CLOSED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | skanton | ||||
| Version: | unspecified | ||||||
| Target Milestone: | 0.5M0 | ||||||
| Hardware: | PC | ||||||
| OS: | Mac OS X - Carbon (unsup.) | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Navid Mehregani
From implementation facet activation works in following way. Facet's tab in tigerstripe.xml is used to list/configure all facets which could be used/managed during generation phase. To activate/deactivate a facet you could use "Facets -> Mark as Active" context menu in Tigerstripe Explorer. And there are could be only one active facet during one time. After a facet activation all appropriate artifacts are grayed out in the explorer and diagrams. The implementation looks correct. If you want to change it please describe expected behaviour in more details. Thanks Anton! As discussed on the call, the workflow is a bit confusing. Let's add a description to the right side of the Facet page in tigerstripe.xml to prevent users from making the same mistake I made. Description: The Facets specified on this page are used at generation time only. To activate a Facet such that exclusions are displayed in Tigerstripe Explorer and Diagrams, right click on the Facet > Select 'Facets' > 'Mark As Active'. Note that there can only be one active Facet at a given time. I also found the following defect: 1) Create a Tigerstripe project 2) Create two entities under com.mycompany package called Ent0 and Ent1 3) Create two entities under org.eclipse package called E0 and E1 4) Create a facet called ExcludeCom and specify com.* under its Excluded Patterns (in Scope tab) 5) Create a facet called ExcludeOrg and specify org.* under its Excluded Patterns (in Scope tab) 6) Open tigerstripe.xml file > Switch to Facets tab 7) Click on Add and select both facets 8) Select ExcludeCom under Facet references list > Under Output Directory, specify ExcludeCom 9) Select ExcludeOrg > Under Output Directory, specify ExcludeOrg 10) Select 'Merge all facets for generation' checkbox 11) Save file. Switch to Generator Settings tab, select a simple generator to print out entity names (generator will be attached) >save file > Run generation The following exceptions occur: java.lang.NullPointerException at org.eclipse.tigerstripe.workbench.internal.contract.segment.FacetReference.equals(FacetReference.java:274) at java.util.ArrayList.indexOf(ArrayList.java:216) at java.util.ArrayList.contains(ArrayList.java:199) at org.eclipse.tigerstripe.workbench.internal.core.model.ArtifactManager.addArtifactManagerListener(ArtifactManager.java:1468) at org.eclipse.tigerstripe.workbench.internal.contract.segment.FacetReference.startListeningToManager(FacetReference.java:115) at org.eclipse.tigerstripe.workbench.internal.api.impl.ArtifactManagerSessionImpl.setActiveFacet(ArtifactManagerSessionImpl.java:550) at org.eclipse.tigerstripe.workbench.internal.core.model.ArtifactManager.propagateFacetChangeToDependencies(ArtifactManager.java:2653) at org.eclipse.tigerstripe.workbench.internal.core.model.ArtifactManager.setActiveFacet(ArtifactManager.java:2707) at org.eclipse.tigerstripe.workbench.internal.api.impl.ArtifactManagerSessionImpl.setActiveFacet(ArtifactManagerSessionImpl.java:549) at org.eclipse.tigerstripe.workbench.internal.api.impl.TigerstripeProjectHandle.setActiveFacet(TigerstripeProjectHandle.java:456) at org.eclipse.tigerstripe.workbench.internal.core.generation.M1Generator.run(M1Generator.java:288) at org.eclipse.tigerstripe.workbench.internal.api.impl.TigerstripeProjectHandle.generate(TigerstripeProjectHandle.java:499) at org.eclipse.tigerstripe.workbench.ui.internal.wizards.generate.NewTigerstripeRunWizard.finishPage(NewTigerstripeRunWizard.java:96) at org.eclipse.tigerstripe.workbench.ui.internal.wizards.NewTSElementWizard$2.run(NewTSElementWizard.java:197) at org.eclipse.jdt.internal.core.BatchOperation.executeOperation(BatchOperation.java:39) at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:728) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975) at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:4777) at org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:106) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121) java.lang.NullPointerException at org.eclipse.tigerstripe.workbench.ui.internal.dialogs.GenerateResultDialog.createDialogArea(GenerateResultDialog.java:82) at org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java:760) at org.eclipse.jface.window.Window.create(Window.java:431) at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089) at org.eclipse.jface.window.Window.open(Window.java:790) at org.eclipse.tigerstripe.workbench.ui.internal.wizards.generate.NewTigerstripeRunWizard.performFinish(NewTigerstripeRunWizard.java:183) at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:811) at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:430) at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624) Created attachment 198655 [details]
Simple generator to print all entity names
Details section added. NPE fixed. Verified. Thanks! |