Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mat-dev] MAT Argument Processing

A PreferenceInitializer was only called when the preference pane was opened, and since the main parser doesn't reference this new bundle, the bundle never activated, so I used the org.eclipse.ui.startup extension point [1] to load the preferences as system props.

[1] http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/extension-points/org_eclipse_ui_startup.html

--
Kevin Grigorenko
IBM WAS SWAT Team
kevin.grigorenko@xxxxxxxxxx
Blog: https://www.ibm.com/developerworks/mydeveloperworks/blogs/kevgrig/?lang=en


Inactive hide details for Kevin Grigorenko---04/26/2013 08:24:46 AM---Hi Andreas, That's a much simpler solution, thanks. With Kevin Grigorenko---04/26/2013 08:24:46 AM---Hi Andreas, That's a much simpler solution, thanks. With this, I'd like to take out the HPROF prefer


    From:

Kevin Grigorenko/Austin/IBM@IBMUS

    To:

Memory Analyzer Dev list <mat-dev@xxxxxxxxxxx>,

    Date:

04/26/2013 08:24 AM

    Subject:

Re: [mat-dev] MAT Argument Processing

    Sent by:

mat-dev-bounces@xxxxxxxxxxx




Hi Andreas, That's a much simpler solution, thanks.

With this, I'd like to take out the HPROF preferences stuff into its own project, org.eclipse.mat.hprof.ui. Are there any caveats to adding a new plugin (other than the basics which I should be able to mimic from other plugins), such as needing to modify the build process?

--
Kevin Grigorenko
IBM WAS SWAT Team
kevin.grigorenko@xxxxxxxxxx
Blog:
https://www.ibm.com/developerworks/mydeveloperworks/blogs/kevgrig/?lang=en


Inactive hide details for "Buchen, Andreas" ---04/26/2013 08:02:49 AM---BTW, Eclipse Proxy Preference dialog is always setting "Buchen, Andreas" ---04/26/2013 08:02:49 AM---BTW, Eclipse Proxy Preference dialog is always setting the system variables (e.g. "http.proxy", etc.
    From:

"Buchen, Andreas" <andreas.buchen@xxxxxxx>
    To:

Memory Analyzer Dev list <mat-dev@xxxxxxxxxxx>,
    Date:

04/26/2013 08:02 AM
    Subject:

Re: [mat-dev] MAT Argument Processing
    Sent by:

mat-dev-bounces@xxxxxxxxxxx





BTW, Eclipse Proxy Preference dialog is always setting the system variables (e.g. “http.proxy”, etc.).

So you could have a PreferenceInitializer which sets it initially on startup, and a PreferencePage which updates the values upon editing.

--> headless code is only using system variables

From:
 mat-dev-bounces@xxxxxxxxxxx [mailto:mat-dev-bounces@xxxxxxxxxxx] On Behalf Of Kevin Grigorenko
Sent:
 Freitag, 26. April 2013 16:03
To:
 mat-dev@xxxxxxxxxxx
Subject:
 [mat-dev] MAT Argument Processing
 

Hey y'all, as part of bug #404679, I added in an HPROF preference page and support for -D parameters to change the behavior of the HPROF parser. The added UI plugin dependencies are optional but if headless mode is run without SWT/jface plugins, then a ClassNotFoundException will be thrown at runtime. The broader question is how best to process and coalesce preference choices and command line arguments. I propose a new extension point called something like argumentsProvider which will allow a plugin to register a callback which has a method that is called before processing the dump (e.g. ParseHeapDumpJob and ParseSnapshotApp) with a Map<String, String>. Then this map can be added to the SnapshotInfo so that lower code can query for arguments without any direct dependencies. With this design, then we can move the HPROF preferences into a new plugin which has an arguments provider. Any thoughts? Is this overengineering to use the plugin architecture for this?

--
Kevin Grigorenko
IBM WAS SWAT Team

kevin.grigorenko@xxxxxxxxxx
Blog:
https://www.ibm.com/developerworks/mydeveloperworks/blogs/kevgrig/?lang=en_______________________________________________
mat-dev mailing list
mat-dev@xxxxxxxxxxx

https://dev.eclipse.org/mailman/listinfo/mat-dev_______________________________________________
mat-dev mailing list
mat-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/mat-dev

GIF image

GIF image


Back to the top