find referances to an eclipse project element in a project hierarchy - eclipse

I am working on a web project in eclipse. I am looking for some way to find references to
a particular file (.js,.css,.html.....).
I want to know that where this particular file is used.
the same functionality ctrl+shift+g
but unfortunately this shortcut only works for keywords(like java classes or methods)
Is there any plugin available for doing this in eclipse ?
Thanks !

How about the normal search dialog, Ctrl+H? Enter the filename as the text.
It's 'easier' for the Java search to work, as Eclipse knows where to look (.java files and .class files) and what to look for (occurences of the class in the Abstract Syntax Tree or bytecode).
For a generic file search that has 'file format knowledge', it needs to know how to parse each file it's looking in.
So the most general way of doing this is a simple text search using Ctrl+H.

Related

Eclipse shortcut should only work on selected File or Project in Package Explorer

I want to add some shortcuts to my product which should only be activated if I select a DSL file or a project. There are no contextIDs which I can use so I want to define my own context. The question is if it is possible to define a context which only gets activated when a DSL file or project is selected. Because I use DSL files and Java files in the same project I created a formatter for the DSL files but I want the same shortcut for both formatters. There for I need a contextID which depends on the file type.
let me know if you need further information.
I hope you guys can help me and I hope there is a solution.

What exactly is the purpose of File name patterns when refactoring in Eclipse?

This option shows up in several different places such as when renaming a package or a class in Eclipse. Pretty sure it's something fairly simple but I was curious to know how it works.
This is Eclipse's documentation on rename https://help.eclipse.org/latest/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2FgettingStarted%2Fqs-35c.htm ...but couldn't find what I was looking for.
The pattern specifies what non-Java files are searched for the name.
For example you might specify *.xml to look for the name in all XML files.
One use for this is in plug-in development where you might just want to search plugin.xml for the name. Or *.e4xmi to look for the name in e4 application fragments.

how to find file (Open Type) by project in eclipse

In eclipse (neon) I have several projects with similar files
I want to able to pick project when open type maybe using Path or Project name
Is there any plugin or similar way to get it?
I think you are asking for open resource(Ctrl+Shift+R) not open type(Ctrl+Shift+T).
IMHO there is no way to filter out types by their paths, as because same type(ex Enum/Inner class) may exist in different Java classes.
Yes. You can filter out resources by project/folder path. Refer this answer https://stackoverflow.com/a/39568618/1391924
Open Resource and Open Type both let You use Working Sets.
So You can define a WS per project or whatever makes sense for You and use the one You need at the given moment.
You can choose the WS directly in the modal dialog.

Eclipse How To Import External Library's Documentation

When we import the external library to eclipse Java project, we can use the auto-correction feature of eclipse for the imported methods from new libraries but we can't see what the methods specifically do. We have to import library's documentation.
Question1: How can I import documentation into eclipse project?
Question2: What does Java Documentation look like?
Question3: Which file format does Java documentation use?
Right click on your project->properties->java build path
select the libraries (its generally .jar file)
click on the dropdown of the libraries to expand the settings-> select source attachment none and click on edit
select the source to the doc ( java documents generally represented by JavaDoc)
click okay.
Question1: How can I import documentation into eclipse project?
In the project explorer, right-click on the library and select Properties. In the resulting dialog, choose "Javadoc Location" and complete the information.
Question2: What is Java Documentation looks like?
A set of directories with HTML files for each class. There is typically an index.hml at the root, plus often a package-list file too. Eclipse searches for these when you "validate" the location.
Question3: Which file format java documentation using?
Eclipse accepts a URL (to a file or a web page), a ZIP or a JAR.
In your package explorer (and most likely on other places as well) you can see your jar file (the external library). Right click on that and choose 'properties'. There you've got the options to attach the sources and the javadoc. After you've done that you can view their javadoc as you view your own (i.e. hover, 'javadoc-view', F3 ...)
Formatted text
Javadoc http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html
as far as i know for your Question1: How can i import documentation into eclipse project?
suppose you are using AXIS.jar and u want to get its doc properties then :
In the Package Explorer view expand your project and its library folder for the Axis library.
Right-click the Axis jar and select Properties.
In the Properties dialog, select Javadoc Location in the tree on the left.
With the Javadoc URL option selected, click Browse.
Navigate to the appropriate folder (see table that follows) and click OK twice to exit the Properties dialog.
Question2: What is Java Documentation looks like? and Question3:Which file format java documentation using?
HTML,zip or jar i guess :))
and
COvayurt, you cannot see what methods do specifically because you have added libraries for those methods not the java docoumentation for those libraries, so in order to add java doc for libraries simply provide the path of your docs location(if you have got docs for those libraries).
right click on your project then under properties set the javadoc path.
java documentation are html files created from the standard classes.you can create java doc for your own project too. see this link
and if you want to see standard java api documentation here-it-is

Eclipse plugin for better JSP support

I'm looking for an eclipse plugin which can at least search where the current JSP is included (or the path mentioned for example in custom "include like" tags or comment or anything). Similar like doing copy qualified name and do a file search with the correct path.In IDEA it's called Analyze Backward Dependencies and it works for JSPs too (at least for the standard includes).
A better one would be to show all the JSPs where the current one is included and show all the included JSPs recursively as a tree maybe so I can navigate in it easily. I'm not sure if this can be done to be usable (I think it would be slow).
Another feature I would like if I click on a variable's name it jumps to where it's declared with even if it's declared in a different JSP.IDEA can do this too.
I have a simple solution for the first one but I can't add more functionality to it as I'm not familiar with the eclipse plugin system and RCP and I don't really have time to learn it.
And please don't tell me to use IDEA because unfortunately that's not an option at work.