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

Navigator view for Gradle build scripts #85

Open
radimk opened this issue Nov 10, 2013 · 13 comments
Open

Navigator view for Gradle build scripts #85

radimk opened this issue Nov 10, 2013 · 13 comments

Comments

@radimk
Copy link

radimk commented Nov 10, 2013

Similar functionality as for Ant build.xml to show structure of build.gradle / list of targets. List of target should probably make it possible to run it immediately.

@kelemen
Copy link
Owner

kelemen commented Nov 10, 2013

Did you mean the same thing as in the project's context menu under "Tasks", only as a subnode for "build.gradle" (or whatever)?

@radimk
Copy link
Author

radimk commented Nov 10, 2013

I mean the Navigator view displayed with Ctrl-7 shortcut. And if you can create tasks as subnodes of build.gradle it will be probably very simple to hook it into this view as well.

I think that similar feature in IJ is handy.

@kelemen
Copy link
Owner

kelemen commented Nov 10, 2013

I see. Do you happen to know how to link something with build.gradle, so that it is displayed in the navigator?

@radimk
Copy link
Author

radimk commented Nov 10, 2013

http://bits.netbeans.org/dev/javadoc/org-netbeans-spi-navigator/overview-summary.html
Bind it to Gradle MIME type. I'd look at ant module in NetBeans sources to see how the panel is created.

@kelemen
Copy link
Owner

kelemen commented Nov 10, 2013

Thanks, I'll read this. Anyway, Gradle mime type is still problematic as it is effectively the same as Groovy. I believe this is why two "Source" button is displayed for Gradle files (and Groovy) above the editor. Sadly, noone could tell me how to actually create the mime type properly (there was always some problem with it). That is, Gradle files should be treated like Groovy files in the editor but have a different icon.

@kelemen
Copy link
Owner

kelemen commented Nov 10, 2013

What do you think of such a solution where I replace the current "Tasks" action in the project's context menu with something like this: "Tasks in Navigator". This would activate the Navigator tab where tasks would be listed. I imagine a list where each line is a task with two buttons: "Run" and "Run with Different Arguments". Though with icons instead of a text captions. My problem with the current tasks action node always was that there could be a lot more tasks what can be displayed (this is true for some of my projects). Also, the list view can be easier to click on.

@radimk
Copy link
Author

radimk commented Nov 11, 2013

  1. Similar problem was solved for Ant by two-level menu: all tasks with description (and maybe not starting with '-') are in first level menu and then there is 'More Tasks' with the rest. Perhaps we can do something similar. Or just use a couple of regexps.
  2. I do not like the idea of use context menu to open some view and find my task again here. I can do Ctrl-7 directly in such case.

@kelemen
Copy link
Owner

kelemen commented Nov 11, 2013

Even if not the context menu, I'd prefer if there was also a more noticable way to list the tasks in the navigator. I'm not against showing the tasks for each ".gradle" file but there should be another way as well. That is, I don't always editing the build scripts right before I want to execute a task.

Speaking of tasks, there should be a way to more quickly refresh the list of tasks. Although, fetching the tasks only takes considerably less effort than reloading the project, the internal structure of the code doesn't really support it. This is because it is not currently possible to change parts of the internal model, only reload the whole model as a single step. This is one thing to keep in mind for the new API.

@radimk
Copy link
Author

radimk commented Nov 12, 2013

BTW: when this is done it will be simple to copy 'Add shortcut...' action that you can see on Ant task nodes. This lets you create toolbar/menu/shortcut running a build target. I think this can help a lot because it will simplify launching of non-standard tasks.

@kelemen
Copy link
Owner

kelemen commented Nov 12, 2013

Shortcuts would be nice but maybe it would be even better for custom tasks defined by the user. Anyway, I'll do this for the release after the next one (i.e., for 1.2.9) because I'll have a new release after Gradle 1.9 is out. This and the improved API for extensions is my priority.

@mam0nth
Copy link
Contributor

mam0nth commented Dec 13, 2013

Maybe this issue similar to the new feature available in upcoming release of netbeans for Maven. Geertjan has been blogged about it. You can check here: https://blogs.oracle.com/geertjan/entry/early_maven_christmas_present_from. This is also nice to have :)

I guess for the possible solution in the duplicate button in the editor because of conflicting MIME-Type is "shadow". NetBeans have this a long ago but I'm not sure if it can be used on MIME-Type. http://wiki.netbeans.org/DevFaqDotShadowFiles

@kelemen
Copy link
Owner

kelemen commented Dec 13, 2013

Shadow files could be good if I knew how to hook into file opening and open something else instead (if it is possible) but thanks for letting me know.

@mam0nth
Copy link
Contributor

mam0nth commented Dec 27, 2013

Hi Kelemen, I'm wrong with the shadow file to fix the mime type. I opened another issue for the mime type(#107). It is focus only for the mime type and I opened another issue(#108) for improving the gradle editor especially on dependencies lookup.

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

No branches or pull requests

3 participants