Opening Eclipse linked content from "Help Content" in plugin - eclipse

I'm trying to develop an eclipse plugin (GUI) which will include a button that I want linked to some page in the Eclipse Help Content, according to some parameters chosen in the plugin (gui), so when I press it, the content opens.
I saw that help content are found on, and can be opened in a browser like way using their http://xx.xx.xx.xx/help/..(rest of path)/(my page).html .
my question is how can i get this xx.xx.xx.xx in the code or the whole path so I can need only to concatenate (my page). (what you see in red in pic).
I assume this is some field in a class that represents this server.
Thanks
what this port looks like

You normally use the Eclipse Help System to display help pages:
IWorkbenchHelpSystem helpSys = PlatformUI.getWorkbench().getHelpSystem();
helpSys.displayHelp("help context id");

Related

Opening the project browser in EA

From addin Session.Repository.ShowBrowser is used to show the project browser but we have to provide tab name and url as argument for this.So what are the values for those arguments we can provide such that if project browser is not openend we want to open it from adddin
Repository.ShowBrowser is used to call an internal browser and not the project browser .Its undocumented seems .
Please refer in Sparx Community for more details .
As #dahsra said, this is not possible via API. You could mimic the key press Alt-0 to enforce showing the project browser.

how to get the X path for cucumber testing?

I tried it by right clicking on the web page and there is no xpath icon. So how can I make visible the xpath of the web page. Please reply soon. Now I am learning on cucumber automation testing. It is very important to know how to find the xpath of the web page.
You can also use ChroPath to find xpath of an object. Chropath is an extension of chrome browser. It gives value of selected object. Can be seen in Developer tool only.
The java side of this may let me down, but is there a specific reason you need the xpath rather than the css selectors?
But answering your question, if you use chrome and right click on the element you want to find the selector for. The select inspect at the bottom of the menu. This will open the dev tools at the bottom of your browser.
Find the element you want to target, right click that (within the dev tools) then expand the copy list in the menu and select copy xpath. If you look at the screenshot you can see that I can copy the xpath of the google logo

K2: How may I open a file in a new window unless I already have such a window open?

I have a K2 Smartform that displays a list of file names. When the user clicks a file name, the program opens that file (all of them are PDFs) in a new tab in the browser (IE). This is good so far. If you click on a second file from the list, it opens in a third tab. That is not what the user wants.
They want the second file selection to open in the same window as the first file.
This is the process I can see:
Click on the file in the list.
Open in a tab.
Click on a second file in the list.
If there is already a tab open with a file from the list, open this file there. Otherwise, open a new tab for the file.
I suppose automatically closing the first tab when they click on the second file would accomplish the same thing.
How can this be done?
When you deal with opening links, first of all, what you can do is limited. Indeed, browsers (IE, Chrome, etc...) can be configured by the users to open links in new tabs, windows, etc... and you as form developer cannot change that.
I have made a jsfiddle to reproduce your situation and propose a solution you can test. I don´t guaranty it will work as I use a Mac but I also describe a better solution below.
You can find it here:
https://jsfiddle.net/chevdor/45k40npv/
I guess the first example (#1) is what happens for you at the moment.
Using the 'target' attribute, I tried to implement a solution that may work for you. Click on #2 and #3 and check whether this work.
I cannot test that since I use a Mac.
You can read more about the target attribute here:
http://www.w3schools.com/tags/att_a_target.asp
Another solution that would give you more control is to use an iFrame control. I think it comes in standard with SmartForms now. If not, you can for sure get it from the community site. I recommend you create a new View with this iFrame and define one parameter (string) called "url".
Let´s speak in K2 rules languages :)
"When the parameter changed", "and the parameters is defined", if you 'Transfer data' passing your URL to the iFrame control, it will display your doc. If the user clicks another document, it will update the SAME iFrame. With this solution, no tab will ever be involved.
Please note that it will work great for any document supported by your browser. Some types may require a plugin. Other documents (ie zip, etc..) will NOT appear but be downloaded instead.
I hope this helps.
Best regards,
-chevdor

How would I show an HTML page in Eclipse at Design Time?

When I'm writing crappy code in eclipse and I'm looking at a website for help I am constantly flipping back and forth between the browser and eclipse. To help me write crappy code faster is there a way to have a View that has a web page in it? I need to be able to set the URL and if I'm navigating around the site have a button to have it return to the original URL. So a URL Address box and 1 favorite link.
BTW I'm not a Eclipse plugin developer.
menu: window / show view / other ...
enter browser in the search box on top
select internal web browser
i would recommend you to install the web development tools
menu: help / install new software
select the software site for your eclipse installation (in my case it's "Helios - http://download.eclipse.org/releases/helios")
enter "web" in the search bar (and wait a little bit) and select "Eclipse Web Developer Toos" and "Web Page Edtior (Optional)"
Just open your HTML file with web page editor. This will open in view where you can view the html code as well as the design it is going to create at run time.

Content Editor Web part is not showing "Rich Text and Source Edit" options int he browser

In my sharepoint 2010 desiner project I am not getting displayed of "Rich Text and Source Editor" options for Content Editor Webpart . The more surprising issue is if I run the project on my local server, the web part is displayed with all the options, but if I run the same project on the remote server, the fallowing options are missing. Can any one have any idea about this type of problem. Any help would be greatly appreciated.
Thank you,
Baluk
I have found an issue that if you start a <style> in the Content Editor Webpart and do not close the tag, it will not display the drop down for the edit menu for the Web Part. Have you added any styles to the Web Part? The way I fixed this was having to delete the Web Part and add a new one.
Check the IE versions you are on. It works fine in IE6, problems are in IE8. You may have to enable compatability view.
Try adding it in trusted site zone.
Cheers !
Rajdeep