|
Re: Validation - constraintProvider - package [message #80848 is a reply to message #80847] |
Tue, 24 April 2007 13:36 |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, Grzesiek,
I see that there is an early filter in the determination of the constraints
applicable to an EObject, that checks the EObject's EClass's EPackage
against the packages declared by the constraint provider (in the default
XML-based implementation, that is; custom providers can behave
differently). This will prevent the framework from consulting the
provider, which constraints would correctly determine (by EClass
inheritance) that they apply.
The EPackage filtering should account for the possibility that one package
"extends" another. Would you mind raising a bug?
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=EMFT& ;version=1.1&component=Validation
Cheers,
Christian
Grzegorz Biaek wrote:
> Hello,
>
>
>
> I have a model divided to many packages. In one of my package I have
> defined interface ExpressionHolder with feature Expression. In other
> packages I implement this interface. I want to add constraint to check
> expression in any place where someone use ExpressionHolder.
>
>
>
> I create 'constraintProvider' and 'constraint' for type ExpressionHolder
> and this works but I must list any packages that probably use my
> interface. Is it possible to not include all that packages but only base
> package (I want to someone may create own model for some extension in the
> future)?
>
>
>
> Grzesiek
|
|
|
|
Re: Validation - constraintProvider - package [message #81147 is a reply to message #81132] |
Wed, 25 April 2007 13:40 |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, Grzesiek,
Your English is very good.
I suspect that your WorkspaceCommandStack perhaps isn't being notified when
commands are executed in your second editor. Try putting a breakpoint at
the beginning of the
WorkspaceCommandStackImpl.DomainListener.resourceSetChanged( ...)
method to see how it computes the affected resources and whether it retains
them. The resources should be stored in the affectedResources field and
later converted to ResourceContexts in the historyNotification(...) method.
HTH,
Christian
Grzegorz Bialek wrote:
> Thanks
>
> I create request:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=183917
>
> I have one more question to you. I use your's pattern of workbench
> integration from EXTLibraryEditor
> (org.eclipse.emf.workspace.examples.library.editor).
> Few days ago I migrate application from Eclipse 3.2 to 3.3 and I get some
> strange results.
>
> I have two editors for different models (form different epackage) based on
> common parts (abstract editor). In my operationHistoryListener I use code:
> ResourceUndoContext.getAffectedResources(event.getOperation( ));
> but for some reasons in one of my editors it returns empty set. I debug
> this and discover that in first editor I have command with two
> undoContexts:
> org.eclipse.core.commands.operations.UndoContext
> org.eclipse.emf.workspace.ResourceUndoContext
> and in this not working I have only that first context. I don't understand
> why I have different contexts because both command is from shared page of
> editors.
> I don't know where those contexts are set to commands. Do you know how to
> debug this sytuation?
>
> Grzesiek
> (sorry for my English ;> )
>
<snip>
|
|
|
|
Re: Validation - constraintProvider - package [message #604986 is a reply to message #80847] |
Tue, 24 April 2007 13:36 |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, Grzesiek,
I see that there is an early filter in the determination of the constraints
applicable to an EObject, that checks the EObject's EClass's EPackage
against the packages declared by the constraint provider (in the default
XML-based implementation, that is; custom providers can behave
differently). This will prevent the framework from consulting the
provider, which constraints would correctly determine (by EClass
inheritance) that they apply.
The EPackage filtering should account for the possibility that one package
"extends" another. Would you mind raising a bug?
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=EMFT& ;version=1.1&component=Validation
Cheers,
Christian
Grzegorz Biaek wrote:
> Hello,
>
>
>
> I have a model divided to many packages. In one of my package I have
> defined interface ExpressionHolder with feature Expression. In other
> packages I implement this interface. I want to add constraint to check
> expression in any place where someone use ExpressionHolder.
>
>
>
> I create 'constraintProvider' and 'constraint' for type ExpressionHolder
> and this works but I must list any packages that probably use my
> interface. Is it possible to not include all that packages but only base
> package (I want to someone may create own model for some extension in the
> future)?
>
>
>
> Grzesiek
|
|
|
|
Re: Validation - constraintProvider - package [message #605045 is a reply to message #81132] |
Wed, 25 April 2007 13:40 |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, Grzesiek,
Your English is very good.
I suspect that your WorkspaceCommandStack perhaps isn't being notified when
commands are executed in your second editor. Try putting a breakpoint at
the beginning of the
WorkspaceCommandStackImpl.DomainListener.resourceSetChanged( ...)
method to see how it computes the affected resources and whether it retains
them. The resources should be stored in the affectedResources field and
later converted to ResourceContexts in the historyNotification(...) method.
HTH,
Christian
Grzegorz Bialek wrote:
> Thanks
>
> I create request:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=183917
>
> I have one more question to you. I use your's pattern of workbench
> integration from EXTLibraryEditor
> (org.eclipse.emf.workspace.examples.library.editor).
> Few days ago I migrate application from Eclipse 3.2 to 3.3 and I get some
> strange results.
>
> I have two editors for different models (form different epackage) based on
> common parts (abstract editor). In my operationHistoryListener I use code:
> ResourceUndoContext.getAffectedResources(event.getOperation( ));
> but for some reasons in one of my editors it returns empty set. I debug
> this and discover that in first editor I have command with two
> undoContexts:
> org.eclipse.core.commands.operations.UndoContext
> org.eclipse.emf.workspace.ResourceUndoContext
> and in this not working I have only that first context. I don't understand
> why I have different contexts because both command is from shared page of
> editors.
> I don't know where those contexts are set to commands. Do you know how to
> debug this sytuation?
>
> Grzesiek
> (sorry for my English ;> )
>
<snip>
|
|
|
|
Powered by
FUDForum. Page generated in 0.05063 seconds