This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 219575 - Disabling artifacts in profile has variable impact
Summary: Disabling artifacts in profile has variable impact
Status: CLOSED FIXED
Alias: None
Product: Tigerstripe (Archived)
Classification: Technology
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: S0.2.2.5   Edit
Assignee: Navid Mehregani CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-20 05:59 EST by Richard Craddock CLA
Modified: 2012-03-20 12:49 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Craddock CLA 2008-02-20 05:59:35 EST
If I disable certain artifact types in the profile, there is strange behaviour

eg Datatype is disabled, I cannot create new datatypes by the wizard or diagram palette, but existing datatypes are still displayed correctly in the tree/diagram. I cannot edit them though as this a) throws an error (below) from the diagram, or b) simple opens the file in the java editor.

org.eclipse.tigerstripe.workbench.TigerstripeException: No FQN for QNE:org.eclipse.tigerstripe.workbench.ui.visualeditor.impl.DatatypeArtifactImpl@d07b83 (name: Dayter, stereotypes: [general]) (package: com.intheravine, isReadonly: false, isAbstract: false)

Running a diagram audit *doesn't* flag this up as an error. The datatype just appears to be ignored.

If I disable AssociationClass, I can create one by dragging the handle between objects on the diagram, but this generates errors in the error log, and does not actually create an artifact in the model.

I have not tried all combinations.....
Comment 1 Richard Craddock CLA 2008-02-20 06:37:43 EST
This is actually much more serious......

I disabled some artifact types - Associations, AssociationClasses and Datatypes.

I then tried to generate a project and I get the error highlighted below.

This appears to be be an initialsiation issue. If I have previously run a plugin before changing the profile, then this is OK, but if the profile is set at eclipse start, then the error is thrown.




[Project: Tuesday, Plugin: simpleOSTest(55)]
Error: An error was detected while triggering 'simpleOSTest(55)' plugin. Generation maybe incomplete.
java.lang.NullPointerException
	at java.util.ArrayList.addAll(Unknown Source)
	at org.eclipse.tigerstripe.workbench.internal.core.model.ArtifactManager.getArtifactsByModelInChained(ArtifactManager.java:1653)
	at org.eclipse.tigerstripe.workbench.internal.core.model.ArtifactManager.getArtifactsByModel(ArtifactManager.java:488)
	at org.eclipse.tigerstripe.workbench.internal.core.project.pluggable.rules.BaseTemplatePPluginRule.getDefaultContext(BaseTemplatePPluginRule.java:233)
	at org.eclipse.tigerstripe.workbench.internal.core.project.pluggable.rules.SimplePPluginRule.trigger(SimplePPluginRule.java:142)
	at org.eclipse.tigerstripe.workbench.internal.core.plugin.pluggable.PluginRuleExecutor.trigger(PluginRuleExecutor.java:77)
	at org.eclipse.tigerstripe.workbench.internal.core.plugin.pluggable.PluggablePlugin.trigger(PluggablePlugin.java:116)
	at org.eclipse.tigerstripe.workbench.internal.core.plugin.PluginHousing.trigger(PluginHousing.java:38)
	at org.eclipse.tigerstripe.workbench.internal.core.plugin.PluginConfig.trigger(PluginConfig.java:178)
	at org.eclipse.tigerstripe.workbench.internal.core.generation.ProjectGenerator.internalPluginLoop(ProjectGenerator.java:412)
	at org.eclipse.tigerstripe.workbench.internal.core.generation.ProjectGenerator.internalRun(ProjectGenerator.java:363)
	at org.eclipse.tigerstripe.workbench.internal.core.generation.ProjectGenerator.run(ProjectGenerator.java:188)
	at org.eclipse.tigerstripe.workbench.eclipse.wizards.generate.NewTigerstripeRunWizard.finishPage(NewTigerstripeRunWizard.java:130)
	at org.eclipse.tigerstripe.workbench.eclipse.wizards.NewTSElementWizard$2.run(NewTSElementWizard.java:193)
	at org.eclipse.jdt.internal.core.BatchOperation.executeOperation(BatchOperation.java:39)
	at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:720)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1797)
	at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:4466)
	at org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:87)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)







Comment 2 Richard Craddock CLA 2008-06-18 12:12:45 EDT
Downgrading - this is a very infrequent activity. 

Profiles are normally created & applied before any model is generated.
Comment 3 Richard Craddock CLA 2008-07-07 07:59:54 EDT
The error condition highlighted below has been fixed in the bug 2369624.

The gui behaviour is still broken.

Comment 4 Richard Craddock CLA 2008-07-07 08:06:43 EDT

When disabling artifacts in teh profile, the items appear to go to "java" items ONLY when you select one of them.


Re-enabling the artifact type in a profile does not reset the gui. The itens cannot be created form the menu etc, and they remain ads "java" items.

However, setting to the default profile DOES re-set the gui.

It seems the workbench reload is not complete in all cases.
Comment 5 Richard Craddock CLA 2010-01-05 10:47:41 EST
If an artifact tytope is disabled in a a profile, then upon generation, the outout still contains that artifact.
Comment 6 Eric Dillon CLA 2010-08-09 21:08:39 EDT
Artifact disabling is fairly rare.
Expect consistent behavior.

Now that the profile is applied thru a restart
Comment 7 Navid Mehregani CLA 2012-03-20 12:49:34 EDT
Closing per comment#6