Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » JDT - MarkerResolution - How to show HTML content in Proposal window(JDT - MarkerResolution - How to show HTML content in Proposal window)
JDT - MarkerResolution - How to show HTML content in Proposal window [message #1755406] Fri, 03 March 2017 05:06
Suresh P is currently offline Suresh PFriend
Messages: 27
Registered: May 2013
Junior Member
Im creating custom Marker solution using JDT/AST.

I have additional data about the resolution that is in HTML format. I would like to show this HTML data in Marker Proposal window (see Attached file).

I have given below the code from getResolutions() method of IMarkerResolutionGenerator2 class. IN this method, the cariable 'resolutionDescription' has the HTML content that need to displayed as additional property of marker resolution.

Can you let me know what changes I have to to do to get the HTML content?

		public IMarkerResolution[] getResolutions(IMarker paramIMarker) {
			IMarkerResolution2[] markerResolutions = null;		
			ArrayList<IMarkerResolution2> markerResolutionsList = new ArrayList<IMarkerResolution2>();
			List<ResolutionType> resolutionTypes = registry.getResolutions();
			Map<String, Set<Integer>> resolutionIndicesMap = registry
			String markerRuleName = paramIMarker.getAttribute(
					MarkerFactory.VIOLATED_RULE_NAME, MarkerFactory.STRING_NA);
			// Handling multiple resolutions for same Rule
			for (Integer resolutionIndex : resolutionIndicesMap.get(markerRuleName)) {
				IConfigurationElement resolutionElement = resolutionTypes.get(
				String resolutionClassName = resolutionElement
				String resolutionRuleInfo = resolutionElement

				String markerRuleDesc= paramIMarker.getAttribute(
						MarkerFactory.VIOLATED_RULE_DESC, MarkerFactory.STRING_NA);

				if (MarkerFactory.STRING_NA.equals(resolutionClassName)
						|| MarkerFactory.STRING_NA.equals(resolutionRuleInfo)) {

					Constructor<?> constructor = (Constructor<?>) Class.forName(
							String.class, String.class);

					if (null == constructor) {
					String resolutionDescription = null;
					if (!MarkerFactory.STRING_NA.equals(markerRuleDesc)) {	       

					Object resolutionClass = constructor.newInstance(
							resolutionRuleInfo, resolutionDescription);

					if (null == resolutionClass
							|| !(resolutionClass instanceof IMarkerResolution2)) {

					markerResolutionsList.add((IMarkerResolution2) resolutionClass);					
			if (!markerResolutionsList.isEmpty()) {
				// Set the fetched results
				markerResolutions = markerResolutionsList
						.toArray(new IMarkerResolution2[markerResolutionsList

			return markerResolutions;

Previous Topic:Debugging: source lookup for dynamically compiled & loaded classes
Next Topic:JDT - Find Length of IF Statement
Goto Forum:

Current Time: Thu Sep 20 00:04:29 GMT 2018

Powered by FUDForum. Page generated in 0.02599 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top