Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Rename Controlled Model File Error(Rename Controlled Model File Error)
Rename Controlled Model File Error [message #1021509] Wed, 20 March 2013 08:50 Go to next message
MyungWoon Oh is currently offline MyungWoon OhFriend
Messages: 52
Registered: March 2012
Member
I used Papyrus Nightly Build, N201303200043 (2013/03/20)

The error occurs when

- I controlled a package named Package11.
index.php/fa/13938/0/

- I rename the contolled model Package11 to Package111.
index.php/fa/13939/0/

- Rename is successfully done.
index.php/fa/13940/0/

- I close the 'model' which has the controlled package and reopen the 'model' then the error occurs.
index.php/fa/13941/0/

I found where the problem came from.
But I don't know how to fix it.

The problem is that 'org.eclipse.papyrus.infra.ui.resources.refactoring.ModelParticipantHelpers.getResourceToFix(IFile)' returns only .uml files(model.uml and Package11.uml) even though the model.di file should be returned and modified together.

Please help me up fixing this problem.
Re: Rename Controlled Model File Error [message #1021526 is a reply to message #1021509] Wed, 20 March 2013 09:18 Go to previous messageGo to next message
Yannick S. is currently offline Yannick S.Friend
Messages: 15
Registered: February 2013
Junior Member
Hello,

just a quick guess : when you rename a project, there is a dialog (Select Rename Options) which offers an option to analyze the impact of the renaming at Project (default value) or Workspace level.

Did you make sure that the entire Workspace is analyzed ?
index.php/fa/13942/0/

HTH.
Re: Rename Controlled Model File Error [message #1021965 is a reply to message #1021526] Thu, 21 March 2013 02:11 Go to previous messageGo to next message
MyungWoon Oh is currently offline MyungWoon OhFriend
Messages: 52
Registered: March 2012
Member
Yes, the error still occurs even when I selected 'Workspace', and I think that is natural because both 'model.di' and 'Package11.di' are under the same Project.

I found further information.
The inner class 'ScopeChooserVisitor' of org.eclipse.papyrus.infra.ui.resources.refactoring.ui.ScopeChooser needs to be modified to fix this error.

index.php/fa/13956/0/

The 'isXMI(IFile)' returns false on the '.notation' file and '.di' file,
because 'contentType' of line 81 is null on those file types.

I try to fix it if possible. Cool
Re: Rename Controlled Model File Error [message #1021989 is a reply to message #1021965] Thu, 21 March 2013 03:51 Go to previous message
MyungWoon Oh is currently offline MyungWoon OhFriend
Messages: 52
Registered: March 2012
Member
I solved this problem. Laughing

Just contributing contentType for '.di' and '.notation' to the Papyrus using 'org.eclipse.core.contenttype.contentTypes' extension point fixes this error.

Here goes a snippet for the contentType contributions.

<extension point="org.eclipse.core.contenttype.contentTypes">
  <content-type
    base-type="org.eclipse.uml2.uml"
    default-charset="UTF-8"
    file-extensions="di"
    id="my.resource.di_0_9_2"
    name="%_UI_DI_0_9_2_content_type"
    priority="normal">
    <describer
      class="org.eclipse.emf.ecore.xmi.impl.RootXMLContentHandlerImpl$Describer">
      <parameter
        name="namespace"
        value="http://www.eclipse.org/papyrus/0.7.0/sashdi">
      </parameter>
      <parameter
        name="kind"
        value="xmi">
      </parameter>
    </describer>
  </content-type>
  <content-type
    base-type="org.eclipse.uml2.uml"
    default-charset="UTF-8"
    file-extensions="notation"
    id="my.resource.notation_0_9_2"
    name="%_UI_NOTATION_0_9_2_content_type"
    priority="normal">
    <describer
      class="org.eclipse.emf.ecore.xmi.impl.RootXMLContentHandlerImpl$Describer">
      <parameter
        name="namespace"
        value="http://www.eclipse.org/gmf/runtime/1.0.2/notation">
      </parameter>
      <parameter
        name="kind"
        value="xmi">
      </parameter>
    </describer>
  </content-type>
</extension>
Previous Topic:Displaying a long constraint in a combined fragment
Next Topic:Can I use 'self' in sequence diagram?
Goto Forum:
  


Current Time: Fri Apr 19 12:17:42 GMT 2024

Powered by FUDForum. Page generated in 0.01897 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top