What does this icon in Eclipse mean? - eclipse

I am referring specifically to the green plus sign in the screenshot below.
[edit] This is taken from "Outline" view, and I am coding in Java.

This might help:
What do the icons in Eclipse mean?
From the icon index, the plus means add, the C means public class, and the warning means that there is a java element warning.
So from what I can assume, it means you can add a new public class, but is warning you of possible problems with your current project.

The green + sign is an overlay that shows that the visibility of the class is set to public. The orange is a warning that there could be a potential issue in that class. This might not necessarily stop your class from running or performing well. It is just telling you to be aware of something that may or may not be harmful.

Related

How to make IntelliJ IDEA highlight the implemented methods of an interface

In Eclipse, when I put the caret on an Interface a class is implementing, the methods are marked in the side bar by default (as small colored stripes). This way I can easily see the methods the class is implementing without having to go into the interface itself and check out what methods it contains
I haven't found anything similar in IntelliJ. Is this even possible somehow easily?
(As a side note, I use Kotlin when programming, but I assume that this feature is not found for Java either)
In Java, you can put the caret on the "implements" keyword and press Ctrl-Shift-F7 to highlight methods implemented via an interface (if the class implements multiple interfaces, you get a popup asking you which methods to highlight). An equivalent feature for Kotlin is not implemented at this time (as of Kotlin 1.3).
In the class body, you can indeed see the interface methods highlighted by gutter icons, as the other answer says.
Methods or properties that are overriding or implementing anything of a parent class or interface are marked next to the line numbers, finding out from which class or interface they are coming can be done by hovering over them:
Clicking on it will take you to the parent/interface definition.
The same mark, but with a downwards pointing arrow, is used in the interface/parent class and shows a list of implementations/overrides when clicked on.
All of this also works for java and scala.

Unity not allowing me to use Screen.safeArea

I am trying to adjust the UI in my game to properly fit on the screen of an iPhone X.
In my code I am attempting to code the line return Screen.safeArea
However 'safeArea' is highlighted red and when I hover over the error with my cursor a message is displayed saying "error CS0117: 'UnityEngine.Screen' does not contain a definition for 'safeArea'".
I dont understand why I'm getting this error because according to Unity's documentation UnityEngine.Screen does contain a definition for safeArea.
Any inclination or idea as to why I am running into this error?
Also, I am working with Unity 2017.2.0f3
As per comments bellow, code as been asked for.
private Screen ReturnSafeArea(){return Screen.safeArea}
as I tried saying, the code has nothing to do with it. Even in this simplistic instance of the use of Screen.safeArea, safeArea is listed as not a definition of UnityEngine.Screen.
Hovering over safeArea displays the following message
"'Screen' does not contain a definition for 'safeArea"
Screen.screenArea is of type Rect and your method is defined as returning a value of type Screen
https://docs.unity3d.com/ScriptReference/Screen-safeArea.html
One way to correct this:
private Rect ReturnSafeArea(){
return Screen.safeArea;
}
Additionally, the field was added in 2017.2.0p1 (Nov 6) and you're on 2017.2.0f3 (Oct 3). Link is for 0.2, but 0.f3 does not have its own page, so likely was made either the same day or very shortly after.
I believe Screen.safeArea was added in a minor release of 2017.2, so 2017.2.0f3 would not have it. Try your code in 2017.2.1 and newer to confirm. It's too bad the documentation doesn't specify that.

Swift ViewController does not respond to -getFile, Could not connect action, target class

My code works all fine but there is always two console message every time I run it.
app works fine but the messages just bugs me so much. Could anyone tell me what is wrong with my code and what does these console message means,thanks
2016-06-13 14:31:15.014
LazyHackintoshGenerator[1625:37250] Could not connect action, target class
LazyHackintoshGenerator.ViewController does not respond to -getFile:
Select your ViewController.
Right-click on its “View Controller” icon (the blue circle with a white square inside).
Look for warning icons (yellow triangles).
Hover over them. An explanation of the problem will appear.
As Feldur said, the problem is probably a leftover link from your storyboard to a method that does not exist anymore (maybe you renamed it or deleted it manually). Remove the link by clicking on the cross, and, if needed, re-link to the appropriate method in your code.
Here is an example of what it will look like in Interface Builder.
Likely a control's action in your storyboard is linked to a method getfile that no longer exists

How to implement Quick Fix / Quick Assist for custom eclipse editor?

I have extended org.eclipse.ui.editors.text.TextEditor to implement a custom editor.
For this editor, I have defined a marker type (org.eclipse.core.resources.markers extension point) and an annotation type (org.eclipse.ui.editors.annotationTypes extension point) to mark specific parts of code in my editor. I use a reconciler to update my annotation model.
Now I want to add a quick fix / quick assist feature. I simply want eclipse, to show a box with proposals, when I hover over an annotated part of the code and replace that part with a given string, when I click on a proposal. Just like the quick fix feature for the java editor.
So, what is the best way to implement this behavior?
I read about marker resolution generators and quick assist processors, but I'm still confused how it all works together...
I would be glad, if someone could point me to the right direction.
EDIT: From what I've understood so far, a MarkerResolutionGenerator is responsible for showing quick fixes in the problems view. To get quick fixes in the source viewer, I would have to set a QuickAssistAssistant for my SourceViewer and implement a QuickAssistProcessor which returns CompletionProposals.
Is this the right way to do it?
EDIT2: I'm wondering if I need Markers at all, or only Annotations, I'm confused...
I finally found out how to get Quick Fix to work for my editor.
I use the annotationTypes extension point to register my own annotation type and the markerAnnotationSpecification extension point to specify the look and feel. In my custom SourceViewerConfiguration class I override getAnnotationHover(...) to return a DefaultAnnotationHover object and getTextHover(...) to return a DefaultTextHover object, so the annotations are shown in my source viewer.
Then I override getReconciler(...) to return a MonoReconciler with my own implementation of IReconcilingStrategy to create the annotations in its reconcile(...) method. And finally I override getQuickAssistAssistant(...) to return a QuickAssistAssistant with my own implementation of IQuickAssistProcessor. The computeQuickAssistProposals(...) method in the processor class computes the quick fix proposals which show up, when I press CTRL+1.
I don't create any Marker objects and don't use a MarkerResolutionGenerator, since the marker concept is much more heavyweight than using only annotations and the functionality which annotations provide fits my needs.
You have to register an extension to the extension point org.eclipse.ui.ide.markerResolution. This extension refers to a markerType (using the markerId), and also a resolution generator.
The latter component is responsible for calculating the possible fixes: it reads the marker, it can check the related files, etc., and creates marker resolution instances. These resolution instances basically process the erroneous files, and hopefully fix the original problem.
During marker resolution, you should not worry about removing the markers, as after the fix is executed, sometimes the validation would run again (e.g. during the build, or if no automatic validation is available, then manually - but it is not the task of the marker resolution to update the list of markers).

Where is 'Class Actions' in the 'Object Identity' panel in Interface Builder?

I thought I was fairly experienced at iPhone development, but I'm tripping up on the Stanford iPhone course on the very first video.
(38 mins in)
The teacher, drags an NSObject into the MainWindow.xib. And when he inspects the Object in the Identity Inspector (Cmd-4), there are Class Actions and Class Outlets sections.
However, these don't appear for me, just Class Identity and Interface Builder Identity... Where have they gone?
Interface Builder has gone through some changes recently. Go to classes in the library panel, select the object from the top half you wish to inspect and the lower half of the screen has tabs for Lineage, Definitions, Outlets and Actions.
In the library panel find the Segmented-Button, Click on classes. Find NSObject or any other class you would like to subclass. Right click and "New subclass...", Name it something useful in the pop up like controller/AppController. Find your newly named Class in the class list. Now add all your actions/outlets in the Bottom of the library panel.
Thanks to Convolution I would never have found this. (Just thought I'd expand on the above tip).
I finally solve my issue as the same as you. Before , I used a earlier version of IB, that's 3.1. And I can access "Class Actions and Class Outlets sections" on Tools-> Identity Inspector Panel. But after I choose another macbook (which IB is upgraded to version 3.2.1), I must access the corresponding section Library panel->Classes Tab->choose the specified object, then go to the panel's lower part(as illustrated by Convolution).