Iam making a new view plugin for eclipse and I need it to display a website.
I know there are eclipse views already that does that but I haven't found a way to do it. I know it is very simple using a JFrame or similar but how can I get it to show in an eclipse view?
Thank you
You can use an SWT Browser component, as described at http://git.eclipse.org/c/platform/eclipse.platform.swt.git/tree/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet128.java -- you would need to add the Browser to the view's composite parent when the view is created.
Related
I'm creating a web development framework with Eclipse RCP.
By reimplementing Eclipse's open source, I created a view with added functionality to the existing view.
I want to replace the view provided by default in Eclipse with a view I created.
Is there a way to delete a view that is built-in in eclipse?
You can get a list of views through the ViewRegistry class.
Is there any way to remove the view from here?
I have a simple question. I'm making application in Android Studio and I have got a problem. My application is creating buttons using Java. I want see these buttons in Preview editor, because I want have easier posibility to editing layout. So I made the same buttons in XML, but here is the problem. When I build my app it is showing both buttons! I want see only the buttons creating by Java code and finally here is my question it is possible remove buttons created in XML? I was thinking about tools:.. but I didn't find any usefull tag. Someone have any idea?
You can use tools:visibility="visible" and android:visibility="gone" together, so they show in the preview, but they're gone when the app is running on a device/emulator.
As already mentioned, you use tools:visibility="visible" in combination with android:visibility="gone" to render any view in preview but not in the build.
Using removeView(someChildElement) on your layout will remove the element you don't want. AFAIK, the XML code will still be there in the APK, but it isn't there at all in the built APK.
I have no clue why you want to show them in preview and not in the finished result. If it is because you want to toggle them manually later, you don't need any XML code. You can also do:
someView.setVisibility(GONE)
And a quick reference:
Visible - the view is visible
Invisible - the view is invisible, but still takes up space
Gone - the view is invisible and takes up no space
You cannot remove the code from the XML file on build though.
‘I am writing a test automation script in Appium for Android Application,……….
I have a scenario where I need to access a view that is directly attached to the window (not attached to the activity). Apparently, By.id method tries to find views which are added to the activity’s view hierarchy, which makes sense. Is there a way through which I can access views added to the window directly?
If this view yours, save link to rootView(fe layout) and use layout.findViewbyid().
I am developing an application which calculates routes using Google Maps API. I want to display the map in a view of an Eclipse RCP perspective and not by creating a browser instance and displaying the whole browser in a view.
Is that possible? If so, how?
It could be possible. you might end up arranging/painting tile images on SWT canvas that you get from Maps API
I'm new to eclipse plug-in development, and have a little question here.
I want to open a new view by clicking on an object in an editor. Specifically, the object is a link to an image file, that should be opened in an image viewer. For now, I'm using
ImageViewer viewer = (ImageViewer) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(viewer_ID);
viewer.setSelection(pathToFile);
is this how you would normally do it (both opening the view, and getting the image to it), or is there a better way?
As answered in another question, your code is the way to go, but there's a slightly more stable way to do it within a Handler.
Once you opened the view, you can use any of its API.