Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add label to the top of source viewer
- Loading branch information
Showing
4 changed files
with
86 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
...dio/studio/client/workbench/views/source/editors/codebrowser/CodeBrowserContextLabel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package org.rstudio.studio.client.workbench.views.source.editors.codebrowser; | ||
|
||
import org.rstudio.studio.client.workbench.codesearch.model.SearchPathFunctionDefinition; | ||
|
||
import com.google.gwt.user.client.ui.Composite; | ||
import com.google.gwt.user.client.ui.HorizontalPanel; | ||
import com.google.gwt.user.client.ui.Label; | ||
|
||
public class CodeBrowserContextLabel extends Composite | ||
{ | ||
public CodeBrowserContextLabel(CodeBrowserEditingTargetWidget.Styles styles) | ||
{ | ||
HorizontalPanel panel = new HorizontalPanel(); | ||
|
||
nameLabel_ = new Label(); | ||
nameLabel_.addStyleName(styles.functionName()); | ||
panel.add(nameLabel_); | ||
|
||
namespaceLabel_ = new Label(); | ||
namespaceLabel_.addStyleName(styles.functionNamespace()); | ||
panel.add(namespaceLabel_); | ||
|
||
initWidget(panel); | ||
} | ||
|
||
public void setCurrentFunction(SearchPathFunctionDefinition functionDef) | ||
{ | ||
nameLabel_.setText(functionDef.getName()); | ||
namespaceLabel_.setText("{" + functionDef.getNamespace() + "}"); | ||
} | ||
|
||
private Label nameLabel_; | ||
private Label namespaceLabel_; | ||
} |
14 changes: 14 additions & 0 deletions
14
...udio/client/workbench/views/source/editors/codebrowser/CodeBrowserEditingTargetWidget.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
.functionName { | ||
margin-right: 5px; | ||
} | ||
|
||
.functionNamespace { | ||
|
||
|
||
} | ||
|
||
.readOnly { | ||
margin-right: 7px; | ||
color: #888; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters