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

[feature request] panel buton to launch GFM Viewer View #42

Closed
paulvi opened this issue Apr 18, 2014 · 16 comments
Closed

[feature request] panel buton to launch GFM Viewer View #42

paulvi opened this issue Apr 18, 2014 · 16 comments
Milestone

Comments

@paulvi
Copy link
Collaborator

paulvi commented Apr 18, 2014

@satyagraha maybe could hint how Markdown preview could have icon to launch GFM Viewer View (if installed)

This way, two plugins would be nicely integrated.

@satyagraha
Copy link
Contributor

That's not too hard. From an Action contribution or similar, you can do:

    try {
        IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
        String gfmViewId = "code.satyagraha.gfm.viewer.views.GfmView";
        IViewPart gfmView = activePage.showView(gfmViewId);
        activePage.activate(gfmView);
    } catch (PartInitException e) {
        // pass
    }

@paulvi
Copy link
Collaborator Author

paulvi commented May 9, 2014

@satyagraha Frankly, I don't know how to accomplish this.

@paulvi
Copy link
Collaborator Author

paulvi commented May 9, 2014

And is not as simple as it seems:

  • need to check if GFMV is installed
  • Rendering for the same .md should be shown in GFMV, even though Editor may be closed already.

OK, that was dreaming that makes it complicated.

@satyagraha
Copy link
Contributor

Not so complicated.

The exception handler covers the situation when GFMV is not installed. If you want better user feedback, then replace the // passwith:

MessageDialog.openWarning(
  window.getShell(),
  "Notification",
  "Please install GFM viewer plugin, see https://github.com/satyagraha/gfm_viewer");

Assuming GFMV is installed, then when focus returns to the editor input, then the viewer window is notified internally and the view is automatically updated (if possible).

If I had more time, I could prototype this, however I am very occupied at present.

@paulvi paulvi added this to the 1.2 milestone Jan 12, 2015
@paulvi
Copy link
Collaborator Author

paulvi commented Jan 12, 2015

Please remind me.

GFMV #18 is using Eclipse 4.x APIs like Part, while this plugin is not.

I wonder if code above by @satyagraha would work on Eclipse 3.x

_markdown42

paulvi added a commit to Nodeclipse/Eclipse-Markdown-Editor-Plugin that referenced this issue Jan 12, 2015
@satyagraha
Copy link
Contributor

Note GFMV does not use Eclipse 4.x-specific API's or classes. The compilation problem above is easily resolved by editing the plugin.xml for the Winterwell editor and adding the org.eclipse.ui.workbench entry to the Required Plug-Ins list.

@paulvi
Copy link
Collaborator Author

paulvi commented Jan 12, 2015

@satyagraha please check/comment PR #53

@paulvi
Copy link
Collaborator Author

paulvi commented Jan 27, 2015

closing with #52 #53

@paulvi paulvi closed this as completed Jan 27, 2015
@juanavelez
Copy link

Getting this error now with latest version (1.2.0.201501260515)

screen shot 2016-01-07 at 9 06 13 am

@paulvi
Copy link
Collaborator Author

paulvi commented Jan 8, 2016

Do you have GFM Viewer installed ?

@juanavelez
Copy link

That worked. Thanks

On Jan 8, 2016, at 5:28 AM, Paul Verest notifications@github.com wrote:

Do you have GFM Viewer https://github.com/satyagraha/gfm_viewer View installed ?


Reply to this email directly or view it on GitHub #42 (comment).

@PyvesB
Copy link
Contributor

PyvesB commented Apr 27, 2019

Just hit the same error message. It may be more helpful if the error message stated something along the lines of "Have you properly installed the gfm_viewer plugin?". It could also be listed as an optional dependency when installing Eclipse-Markdown-Editor-Plugin.

@paulvi
Copy link
Collaborator Author

paulvi commented Apr 28, 2019

The message is just string within this project,
welcome to change it as you like.

@paulvi
Copy link
Collaborator Author

paulvi commented Apr 29, 2019

It could also be listed as an optional dependency when installing Eclipse-Markdown-Editor-Plugin.

It would first require to have GFM_Viewer to be in the same p2 repository as this plugin.

@PyvesB
Copy link
Contributor

PyvesB commented Apr 29, 2019

It could also be listed as an optional dependency when installing Eclipse-Markdown-Editor-Plugin.

It would first require to have GFM_Viewer to be in the same p2 repository as this plugin.

Are you sure about this? I noticed the following pane when defining a feature category in Eclipse RCP:

repository

I've never tried configuring anything like this myself, but it does seem to imply that it's possible to link to other p2 repositories.

@paulvi
Copy link
Collaborator Author

paulvi commented Apr 30, 2019

Let's continue in new issue e.g. #83

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

No branches or pull requests

4 participants