Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend the "Web Application" Debug Configuration with an option to run an SDBG (or other) debug session automatically #48

Closed
ivmarkov opened this issue May 7, 2015 · 9 comments

Comments

@ivmarkov
Copy link

ivmarkov commented May 7, 2015

With the IDebugLaunch infrastructure in place, I think this won't be too difficult...
I think the "GWT" tab in the Web Application Debug Configuration can be extended as follows (ASCII art mockup follows):

|=== Debugging =============================|
| [x] Launch a debugging session |
| [ (a combo listing all IDebugLaunch contributions>) |

  • Whether the checkbox should be checked by default, is - of course - debatable
  • The combo should list all IDebugLauch contributions; the first one (whatever "first" means) should be selected by default
  • If no IDebugLaunch contributions are available, the combo and the checkbox should be disabled
@ivmarkov ivmarkov changed the title Extend the "Web Application" Debug Configuration with an option to run an SDBG debug session automatically Extend the "Web Application" Debug Configuration with an option to run an SDBG (or other) debug session automatically May 7, 2015
@branflake2267
Copy link
Contributor

Great idea!

@branflake2267 branflake2267 added this to the GWT Plugin 2.0 milestone May 8, 2015
@branflake2267
Copy link
Contributor

#124 - This will get uploaded to the snapshot later tonight.

screen shot 2015-12-28 at 6 47 46 pm

<extension
       point="com.google.gdt.eclipse.core.browser.launchMenus">
    <client
          class="com.sencha.eclipse.gss.GetMenus">
    </client>
 </extension>
import java.util.ArrayList;
import java.util.List;

import org.eclipse.core.resources.IProject;

import com.google.gdt.eclipse.core.browser.BrowserMenuPopulator.ILaunchMenus;
import com.google.gdt.eclipse.core.browser.LaunchMenuModel;

public class GetMenus implements ILaunchMenus {

  @Override
  public List<LaunchMenuModel> getMenus(IProject project) {
    List<LaunchMenuModel> list = new ArrayList<LaunchMenuModel>();
    list.add(new LaunchMenuModel("AAAAA", "chrome", "http://google.com"));
    list.add(new LaunchMenuModel("BBBBBB", "chrome", "http://docs.sencha.com"));
    list.add(new LaunchMenuModel("BBBBBB", "chrome", "http://sencha.com"));
    return list;
  }

}

Would this work?

@branflake2267
Copy link
Contributor

I may need to add something about the browser implementation. Anyway this will get uploaded tonight to the snapshot repo.

@ivmarkov
Copy link
Author

Good to hear that you are picking up the idea.
I do not understand the need for the extension point you are suggesting though. The existing IDebugLaunch interface and its extension point would be enough isn't?

@branflake2267
Copy link
Contributor

I didn't want to use the existing wiring I didn't believe it had all the properties I needed to configure the menus properly and I didn't want to break the existing one as of yet.

@ivmarkov
Copy link
Author

OK but I think you cannot get-by without IDebugLaunch, because besides displaying these items in the menu, you need to be capable of launching a debugger once the user has selected it in the menu. That's exactly what IDebugLaunch is doing anyway isn't it?

Currently the IDebugLaunch's extension point, com.google.gdt.eclipse.core.debugLauncher only has two properties:

  • class - the implementation of the launcher
  • label - the label which you can possibly display in the menu
   <extension
         point="com.google.gdt.eclipse.core.debugLauncher">
      <extensions
            class="com.github.sdbg.integration.jdt.ChromeDebugLaunch" 
            label="SDBG Chrome JS Debugger">
      </extensions>
   </extension>

Note that the label is part of the extension point and not a property on the IDebugLaunch interface itself (which is good!). How about we enrich the above extension point with additional - possibly optional - properties that you need for the menu? (Even though I'm not yet sure what they would be?)

@branflake2267
Copy link
Contributor

Gotcha. I see what you're saying. I put the label in the class, figuring it might be generated. The other extension point wasn't wired up correctly as of yet but I can revisit it and fix it. I may have to rewrite some of the core to get it done. I was hoping to take a shortcut, but you're right. :) Well anyway, I'm off with the family today. I might get some time tonight, but I'd say I'll aim to get this done thursday.

@branflake2267
Copy link
Contributor

Ah, yeah I see it clearly now. Ugh, yeah, that should be an easy fix later.

@branflake2267
Copy link
Contributor

Turns out the extension IDebugLauncher was what I did sometime ago and I completely glitched when I came back to look at this. My mistake, I've returned it to its previous operation. Funny how that happens to me now in then. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants