[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [equinox-dev] Equinox Aspects: error can't determine modifiersofmissing type

Thanks, I will open a bug.
Oren

-----Original Message-----
From: equinox-dev-bounces@xxxxxxxxxxx
[mailto:equinox-dev-bounces@xxxxxxxxxxx] On Behalf Of Martin Lippert
Sent: Sunday, October 26, 2008 5:29 PM
To: Equinox development mailing list
Subject: Re: [equinox-dev] Equinox Aspects: error can't determine
modifiersofmissing type

Hi Oren!

> Indeed, re-exporting the pde.ui bundle solves the problem, thanks! Could
you
> please explain the meaning of the re-export statement and in particular
when
> should I re-export a dependent bundle? Should I simply re-export all
> dependent bundles?

You don't need to re-export everything, definitely not. There are two 
different things that need a re-export:

- Types (aka packages) that the weaver injects into the target class 
that are not part of your aspect bundle.

- Types (aka packages) that the weaver needs for the weaving process 
itself (pointcut resolution, for example) that are not part of your 
aspect bundle.

Sometimes its get fuzzy to find out what to re-export and what not. 
Maybe we should open a bug for this to thing about making this easier to 
use. Would you open a bug in bugzilla for this? That would be great!

Thanks!!!

Best regards,
-Martin



> 
> Oren 
> 
> -----Original Message-----
> From: equinox-dev-bounces@xxxxxxxxxxx
> [mailto:equinox-dev-bounces@xxxxxxxxxxx] On Behalf Of Martin Lippert
> Sent: Sunday, October 26, 2008 2:43 PM
> To: Equinox development mailing list
> Subject: Re: [equinox-dev] Equinox Aspects: error can't determine
> modifiersof missing type
> 
> Hi Oren!
> 
> The problem seems to occur when the jface bundle is woven and I assume 
> that the weaver cannot resolve the type from the pde-ui bundle that you 
> are using inside your aspect (the weaver needs to resolve that type if 
> its directly used within the pointcut). What happens if you re-export 
> the pde.ui bundle?
> 
> -Martin
> 
> 
> Oren Mishali wrote:
>> Hi,
>>
>>  
>>
>> I'm trying to write a simple aspect that prints a message when the Cancel
>> button of a specific wizard (the Plug-in Project Creation Wizard) is
>> pressed. Here is the aspect's code:
>>
>>  
>>
>> import org.eclipse.pde.internal.ui.wizards.plugin.NewPluginProjectWizard;
>> //org.eclipse.pde.ui
>>
>> import org.eclipse.jface.wizard.Wizard; // org.eclipse.jface
>>
>>  
>>
>> public aspect PluginWizardCancelPressed {
>>
>>  
>>
>>             after(): execution(* Wizard.performCancel(..)) &&
>> this(NewPluginProjectWizard){
>>
>>                         System.out.println(thisJoinPoint);
>>
>>             }
>>
>> }
>>
>>  
>>
>>  
>>
>>  
>>
>> Upon execution I get tons of errors (shown below), and the aspect has no
>> effect. Note that everything works fine when rewriting the aspect in the
>> following way:
>>
>>  
>>
>> public aspect PluginWizardCancelPressed {
>>
>>  
>>
>>             after(Object obj): execution(* Wizard.performCancel(..)) &&
>> this(obj){
>>
>>                         if(obj instanceof  NewPluginProjectWizard)
>>
>>                                     System.out.println(thisJoinPoint);
>>
>>             }
>>
>> }
>>
>>  
>>
>> Any suggestions?
>>
>>  
>>
>> Thanks,
>>
>> Oren
>>
>>  
>>
>> The errors:
>>
>> [org.eclipse.jface] error can't determine modifiers of missing type
>> org.eclipse.pde.internal.ui.wizards.plugin.NewPluginProjectWizard
>>
>> when processing type mungers
org.eclipse.jface.preference.IPreferenceStore
>>
>> when processing type mungers 
>>
>> when weaving 
>>
>>  [Xlint:cantFindType]
>>
>> [org.eclipse.jface] error can't determine modifiers of missing type
>> org.eclipse.pde.internal.ui.wizards.plugin.NewPluginProjectWizard
>>
>> when processing type mungers org.eclipse.jface.internal.JFaceActivator
>>
>> when processing type mungers 
>>
>> when weaving 
>>
>>  [Xlint:cantFindType]
>>
>> [org.eclipse.jface] error can't determine modifiers of missing type
>> org.eclipse.pde.internal.ui.wizards.plugin.NewPluginProjectWizard
>>
>> when processing type mungers org.eclipse.jface.dialogs.IDialogSettings
>>
>> when processing type mungers 
>>
>> when weaving 
>>
>>  [Xlint:cantFindType]
>>
>> [org.eclipse.jface] error can't determine modifiers of missing type
>> org.eclipse.pde.internal.ui.wizards.plugin.NewPluginProjectWizard
>>
>> when processing type mungers
> org.eclipse.jface.preference.PreferenceManager
>> when processing type mungers 
>>
>> when weaving
>>
>> .
>>
>> .
>>
>>  
>>
>> The manifest of the plug-in project containing the aspect:
>>
>> Manifest-Version: 1.0
>>
>> Bundle-ManifestVersion: 2
>>
>> Bundle-Name: Repository Plug-in
>>
>> Bundle-SymbolicName: org.highlevelaj.repository
>>
>> Bundle-Version: 1.0.0
>>
>> Bundle-Activator: org.highlevelaj.repository.Activator
>>
>> Require-Bundle: org.eclipse.ui,
>>
>>  org.eclipse.core.runtime,
>>
>>  org.aspectj.runtime;visibility:=reexport,
>>
>>  org.highlevelaj,
>>
>>  org.eclipse.pde.ui
>>
>> Eclipse-LazyStart: true
>>
>> Export-Package: org.aspectj,
>>
>>  org.highlevelaj.repository
>>
>> Eclipse-SupplementBundle: org.eclipse.pde.ui, org.eclipse.jface
>>
>>  
>>
>>  
>>
>>  
>>
>>  
>>
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> equinox-dev mailing list
>> equinox-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/equinox-dev
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
> 
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
> 
> 
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev