SWTBotEclipseEditor title and tooltip text - eclipse

how to find the title and tooltip text of SWTBotEclipseEditor.getText() method gives the text inside SWTBotEclipseEditor.
SWTBotEclipseEditor editor = bot.editorByTitle("testFoo.txt").toTextEditor();
String title = editor.??? //I want title which is testFoo.txt
String toolTip = editor.getToolTipText(); //not giving 'tooltip text'
please help

As a workaround,I used editor.getReference().getTitle() or
editor.getReference().getTitleToolTip().
http://www.eclipse.org/forums/index.php/t/373784/

Related

officejs : Unable to set underline property to false for hyperlinked text

I inserted text and added a hyperlink to it. After doing this by default the text appears in blue color and underlined. I don't want the underline, but when I try to set the underline property to false, it has no effect on the text. You can find the sample code below.
Word.run(function (context) {
var selection = context.document.getSelection();
var para = selection.insertText("lorem", Word.InsertLocation.end);
para.hyperlink = "https://www.stackoverflow.com";
para.set({
font: {
underline: false
}
});
return context.sync();
}).catch(function (e) {
console.log(e.message);
})
The values for Word's JS API font.underline property do not include false. Try with the string value 'None'.
The accepted Enum values for Font.Underline are listed here.
Note that the blue, underline formatting is Word's default style definition for the Hyperlink style. In the "COM" world the better approach would be to change the style definition to not include an underline. This option is not (yet?) available for JS Add-ins, which provide no functionality for changing or creating styles.

Unity Editor GUI, change the label width of EditorGUILayout.Toggle

I can't find a way to increase the label width of EditorGUILayout.Toggle. Here's my code, it doesn't do anything and Unity clips the text and cuts it short.
GUILayoutOption[] options = new GUILayoutOption[] {
GUILayout.Width(400.0f),
GUILayout.MinWidth(250.0f),
GUILayout.ExpandWidth(true)
};
MyBoolValue = EditorGUILayout.Toggle("My Long Description Text Here", MyBoolValue, options);
I did try wrapping the Toggle button with
EditorGUILayout.BeginHorizontal();
EditorGUILayout.EndHorizontal();
But it also didn't do anything. What can I do remove clipping from the text?
Set EditorGUIUtility.labelWidth before doing your Toggle, and then restore it to its original value so you don't mess up any subsequent controls.
float originalValue = EditorGUIUtility.labelWidth;
EditorGUIUtility.labelWidth = 400;
MyBoolValue = EditorGUILayout.Toggle("My Long Description Text Here", MyBoolValue);
EditorGUIUtility.labelWidth = originalValue;

Extjs quicktip display empty box

I am trying to implement a tool tip (QuickTip) functionality on a GXT grid cell.It seems to work most of the time, but some times I get an empty tooltip box while mousing over the column header. I found some articles stating the tooltip is only applicable to the data and not on header,but thats not the case I guess. I made the toolTip/text null by default, still I see empty box on header-mouse over.Am I doing something wrong?
This is my code:
ColumnConfig columnTitle = new ColumnConfig();
columnTitle.setId("subject");
columnTitle.setHeader("<B>Title</B>")
columnTitle.setRenderer(new GridCellRenderer<ModelData>()
{
#Override
public Object render(ModelData model, String property, ColumnData config, int rowIndex, int colIndex,
ListStore<ModelData> store, Grid<ModelData> grid)
{
SystemUserMessage msg = ((BeanModel)model).getBean();
String text = null;
text = msg.getSubject();
String content = model.get("content").toString();
String toolTip = null;
toolTip = " qtip='" + content + "'";
String style = null;
if(msg.getPriority().equals("High"))
{
style = " style='color: red;'";
}
String html = "<span" + toolTip + style + ">" + text + "</span>";
return html;
}
});
new QuickTip(messageCenterGrid); //register the tooltip
Try replacing qtip= with data-qtip= . You can also add data-qtitle=
Edit helpful link per Juan : http://docs.sencha.com/ext-js/4-1/#!/api/Ext.tip.QuickTipManager

jeditable showing placeholder text in edit textbox

I have an issue with jeditable and trying to customize the style of the placeholder text.
$(".labeledit").editable("....", {
event: "click",
onblur: "submit",
width:($(".labeledit").width() + 40) + "px",
placeholder: "<span class='placeholder'>add label</span>",
tooltip: "Click to update"
});
In the placeholder text I add a span and associate a class. This works fine in the view but when I click on the add label text it places the placeholder text into the textbox so I get
<span class='placeholder'>add label</span>
appearing in the textbox.
If I just have placeholder: "add label" then the add label text doesn't show in the textbox.
What am I doing wrong?
Here it is! Instead of:
...
placeholder: "<span class='placeholder'>add label</span>",
...
try switching the quote marks:
...
placeholder: '<span class="placeholder">add label</span>',
...

OpenLayers - Add according popup text to marker array

I have a probably rather basic problem in OpenLayers, it would be really great if someone could help me out on this one.
I have an array of markers, which should each have a different popup box text. However, I fail in applying the according text to a marker. I tried to do this via another array for the content of the popup boxes. However, i couldn't relate the correct text to a marker. Here is my code:
var vs_locations = [
[13.045240, 47.8013271],
[13.145240, 47.8013271],
[13.245240, 47.8013271],
];
var popupContentHTML = [
"Text for marker with loc[0]",
"Text for marker with loc[1]",
"Text for marker with loc[2]"
];
function addVS(){
for (var i = 0; i < vs_locations.length;i++){
var loc = vs_locations[i];
var feature = new OpenLayers.Feature(volksschulen, new OpenLayers.LonLat(loc[0],loc[1],loc[2]).transform(proj4326,proj900913));
feature.closeBox = true;
feature.data.icon = new OpenLayers.Icon('coffeehouse.png');
feature.popupClass = OpenLayers.Class(OpenLayers.Popup.FramedCloud, {
'autoSize': true,
});
marker = feature.createMarker();
volksschulen.addMarker(marker);
feature.data.popupContentHTML = ; //Here should be the text according to the marker
feature.data.overflow = "auto";
marker.events.register("mousedown", feature, markerClick);
feature.popup = feature.createPopup(feature.closeBox);
map.addPopup(feature.popup);
feature.popup.hide();
}
}
did you try:
feature.data.popupContentHTML = popupContentHTML[i];
assuming the length of your location array matches your text array, both in length anf position