Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8738505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:44:38+00:00 2026-06-13T10:44:38+00:00

This is a much simpler question. private static AplotBaseDialog dlg; public Object execute(final ExecutionEvent

  • 0

This is a much simpler question.

private static AplotBaseDialog dlg; 


public Object execute(final ExecutionEvent event) throws ExecutionException {
  if (dlg == null){
     try {
          Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event).getShell();
          dlg = new AplotBaseDialog(shell, session);  
     }
     catch {
     }
     dlg.open();
     return null;
 }

Ok the above code checks and see if dlg is null. If it is null then create a new dialog.
Then it opens the dialog.

This works when dlg is null. But if dlg is not null, I get a error at the line dlg.open().
The error is pointing to this code in the dialog class

  @Override
  protected Control createContents(Composite parent) {
     Control contents = super.createContents(parent); <==== Right Here
     setTitle("Title");
     setMessage("Message");
     if (image != null) {
        setTitleImage(image);
     }
     return contents;
  }

So my question is how can I open the dialog when dlg != null?

EDIT
Adding some of the error message

enter image description here

line 110 in AplotBaseDialog

Control contents = super.createContents(parent);

line 48 in AplotDialogHandler

dlg.open();
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T10:44:40+00:00Added an answer on June 13, 2026 at 10:44 am

    java.lang.IllegalArgumentException: Argument not valid

    …

    at org.eclipse.swt.widgets.Label.setImage(Label.java:337)

    JavaDoc of Label tells you the following:

    IllegalArgumentException –

    ERROR_INVALID_ARGUMENT – if the image has been disposed

    So, it seems like you already disposed the image you are trying to set.


    There are two solutions for this:

    1. Wait with the disposal of the image until your main application is closed.
    2. Dispose the image when the dialog is closed, but create a new one, when you reopen it.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an object in C# like this: private ClassWidget { public int ID;
Important : Please see this very much related question: Return multiple values in C++
This is pretty much a duplicate question but instead of using Castle Dynamic Proxy
This a data binding question in C#. I have a simple Person class: public
I'm reposting this question as I didn't get much of a response last time,
This might be a simple one, but since I don't have much knowledge about
This feels like it should be pretty simple, but not much seems to be
this pretty much is the thing. When in tinymce I press anything that is
I have done this without much effort on T-SQL, but I want to implement
I really have no idea why I'm struggling with this so much. I'm scraping

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.