my question today is if there is a way for IntelliJ to build with the current class file I have Instead of always going into the configurations setting and changing the Main class from there.
Picture :
Ok I now understand want you want :)
I hope this image helps.
You can create a run configuration for each class with a main method. In this example we have three classes Main1, Main2 and Main3 which you can see on the left in the image. So I created three run configurations called Main1, Main2 and Main3 which have the corresponding classes set as Main class.
You can add multiple run configurations by clicking on the green plus.
In the toolbar you then can choose the run configuration which you want to run.
EDIT:
You can just make a right click on the main method and choose the option run. I guess that is what you want :)
You can probably go in and change the default to default to that class
Related
first of all, im a very newbie to Swift language, I believe, FSCalendar is properly downloaded under my project, but when trying to use the class, it doesn't detect on custom class.
First, I created podfile and add pod 'FSCalendar' on it, and did pod install and everything seemed to go under the project.
second, I dragged and dropped FSCalendar to the project as it seems in the image below and made a view under main view defining custom class 'FSCalendar' and it just shows the FSCalendar designable,
every FSCalendar related classes display on drop down option of custom class, but it just doesnt detect it.
I would appreciate your help in advance, ive been struggling with the initial setting so long
thank you.
here is a screenshot of xcode screen
So this is due to the fact that when you do pod init it creates an .xcworkspace file which you should now be using. This has a similar symbol to the normal .xcodeproj file you'd normally open, except its white, here's a screenshot of what it should look like:
I want my sbt plugin to have the same behavior as sbt run task - use a main class if there's only one and ask a user to choose one if there're multiple. How do I do it?
Turns out selectMainClass setting either shows a dialog or uses the value from mainClass
I have a block (submodel)Submodel_A in a model Model_AA present in a package Package_A. I would like to add Submodel_A into another model Model_AB, which is present in package Package_B.
I tried copying the components or the code and pasting it where I wanted, but did not work. A generic solution would be great.
Thank you for your answer in advance.
I'm not sure if i got your point. But neither
right click on Submodel_A (Package Browser) -> Duplicate Class...
nor
right click on Submodel_A (Package Browser) -> Rename...
(you can use this option to move a model and to ensure that all references to the model will be updated)
solve your problem?
Is it possible for an Eclipse plugin to change the display name of unit tests run by the default Eclipse JUnit plugin?
Some background: I'm trying to create a plugin which will display unit test names (in the JUnit view in Eclipse) a bit different from the actual method name. If the actual test method name is "anEmptyCollectionHasSizeZero" I want it to be displayed in the Eclipse JUnit view as "An empty collection has size zero".
I've managed to display the test method names in the way described above as a separate view in a plugin, but would as I said like to get this feature integrated in the normal JUnit view. I tried to see if I could find a related extension point, but could not find anything. Is it possible to do this?
Also, is there a plugin which already does this, or similar?
I don't know the exact answer, but the best place to start is likely by looking at the code for org.eclipse.jdt.internal.junit.ui.TestRunnerViewPart (in the plug-in org.eclipse.jdt.junit). That ViewPart is the JUnit view that you see in Eclipse.
It looks like org.eclipse.jdt.internal.junit.model.TestCaseElement.getTestMethodName() might be the place where the name is obtained from. Maybe you can trace how/when those elements are created and inject some other name. It looks like the implementation class is internal though (org.eclipse.jdt.internal.junit.model.TestElement), so you might be out of luck.
I'd suggest asking on the JDT forums about the possibility of doing this.
There don't seem to be any plugable way to change the label or the colors used.
(I had hoped the label provider used for the TestViewer was based on a PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator() so the image, label and color could be decorated, but that does not seem to be the case...)
You may want to look at the jnario sources. They have implemented something like that, where the JUnit window displays something that is surely not a stack frame.
You may use the setName() method of the class junit.framework.TestCase (or the constructor with the name parameter).
public MyTestCase() {
super("This is my JUnit test");
By default a TestCase defines the methods to be executed by it's name, which we have just overwritten. To make it runnable we have to overwrite the run method like this.
#Override
protected void runTest() throws Throwable {
testMyTest();
}
I have a custom view displaying a hierarchy model of the current project. The root element is of class MyProject which is my own class, but it represents one Eclipse IProject, and it's adaptable to IProject.
I have a "properties" menu option in the popup menu for that view, and I'd like to open up IProject's properties when a MyProject object is selected. PropertyDialogAction only looks for property pages registered for MyProject and doesn't give me a chance to offer an adapter -- or, at least, I don't know how to offer one.
What's the proper solution for this?
In the meantime, I've overridden PropertyDialogAction to handle my class in the special way I require, but that seems like quite a kludge to get this done.
How did you add the Properties in the Popup menu? Ideally its functionality is to show up the property pages of the current selection - not to show up the properties of the project in which the current selection resides. If you want that, you need to use the menu item Project->Properties - which uses the ProjectPropertyDialogAction instead of the PropertyDialogAction