Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [subversive-dev] Plugin not loads correcly

Hello Andrei,
 
Unfortunately I can't reproduce the problem. But I suppose that the problem could be with that you incorrectly override methods(createMainPanel).
If you just need to override createMainPanel and createBottomPanel, you need to override only them but not the createContents.
I attached you a very simple plugin example which overrides createMainPanel (it just adds a text label). In order to try it you need to import projects from provided zip in workspace where you have Subversive and create an update site in 'commit.extend.update-site' project. (Probably you need to correct dependencies versions for Subversive plugins).

Best regards,
Burilo Igor

 


From: subversive-dev-bounces@xxxxxxxxxxx [mailto:subversive-dev-bounces@xxxxxxxxxxx] On Behalf Of Andrei Pavlenko
Sent: Monday, March 23, 2009 3:00 PM
To: Developers mailing list
Subject: Re: [subversive-dev] Plugin not loads correcly

Hi, Igor,

Thanks for the response.
Let me answer on all the questions you asked.
1. So, when I run my plug-in from workspace everything looks fine and everything works correctly.
2. When I skip step 2) in the installation process the subversive controls are not loaded, so I see only my components on CommitDialog, and there are no Subversive components there. 
When I do not skip step 2) - everything is awesome and everything is work correctly! 
3. There are no any error in ErrorLog
4. Next is the parts from my sources.

public class MyCommitActionFactory implements ICommitActionFactory {

      private MyDialog dialog;

      private ICommitDialog commitDialog;

      public ICommitDialog getCommitDialog(final Shell shell,

                  Collection allFilesToCommit, final ICommentDialogPanel commentPanel) {

            commitDialog = new ICommitDialog() {

                  public String getMessage() {

                       //... 

                  }

                  public int open() {

                        dialog = new MyDialog(new Shell(shell), commentPanel);

                        return dialog.open();

                  }

            };

            return commitDialog;

}


public class MyDialog extends DefaultDialog {

public MyDialog(Shell shell, ICommentDialogPanel commentPanel,

StringBuffer issues) {

super(shell, commentPanel);

this.commentHeaderMessage = issues;

issuePanel = new IssuePanel();

}


public MyDialog(Shell parentShell, MyCommitPanel panel) {

super(parentShell, (IDialogPanel) panel);

this.panel = (IDialogPanel) panel;

issuePanel = new IssuePanel();

}

@Override

protected Control createContents(Composite parent) {


this.parent = parent;

                //call creating Subversive controls there and also some ours controls

                 //...

                 this.dialogArea = this.createMainPanel(composite);

                 //....


return composite;

}

}

Note, then in createContents I extended in some way createButtonPane and createMainPanel where my controls were placed.

Is everything is clear there? 

Can it be something like I override some initial initialisation of Subversive CommitDilaog, if it exists,  or something like that? Or can it be something like subversive plug-in falls somewherre during initialisation? I don't really know what can happen in that case.


2009/3/23 Igor V. Burilo <igor.burilo@xxxxxxxxxxxx>
Hello Andrei,
 
Unfortunately, It's not clear what the problem could be. So we need additional information here.
Do you have Subversive controls when you run your plugin from workspace?
Do you have Subversive controls after restarting Eclipse(you installed with skipping step 2)?
Probably, there are errors in Error Log view.
If it's possible could you please provide your code of extending commit dialog? I suppose there will be 2 classes: one for factory(ICommitActionFactory) and another which implements ICommitDialog (I don't need here all your controls, you can just add, for instance, simple text label or button).
 

Best regards,
Burilo Igor

 


From: subversive-dev-bounces@xxxxxxxxxxx [mailto:subversive-dev-bounces@xxxxxxxxxxx] On Behalf Of Andrey Pavlenko
Sent: Thursday, March 19, 2009 4:31 PM
To: subversive-dev@xxxxxxxxxxx
Subject: [subversive-dev] Plugin not loads correcly

Hi, everyone! Here is the problem we've got developing eclipse plug-in. We extend Subversive plug-in using its extension point (Commit extension). We added some controls to the commit dialogue. Everything OK except the installation steps. To install our plug-in and make it works correctly user have to do some weird steps: 1. Install Subversive plug-in and connectors. 2. Open Commit dialogue of subversive plug-in. (This is weird step) 3. Install our plug-in. 4. Open commit dialogue again - here are all Subversive components and here are our components which we are added! In that case all will work correctly. But if user miss step 2. - there will be NO Subversive controls in the commit dialogue in step 4. Maybe it can be something like Subversive commit dialog initialisation? Can anybody propose the solution for this - how to remove step 2. without such weird behaviour?

--
With Best Regards,
Andrei Pavlenko

_______________________________________________
subversive-dev mailing list
subversive-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/subversive-dev




--
With best regards,
Andrei Pavlenko.
my phone: +38 (095) 8169965
my icq: 260588271

Attachment: commit.extend.zip
Description: Zip compressed data


Back to the top