[Eclipse] I want to open the same file twice [Split editor]

For example, a program in which a large number of variables are defined

I think there is something like "This kind of thing should be divided into different classes!" When I actually write a program in practice, I wonder if I often come across such sources.

public class CloneWindow {

  private static String STR_VAR_1 = "var1";
  private static String STR_VAR_2 = "var2";
  private static String STR_VAR_3 = "var3";
  private static String STR_VAR_4 = "var4";
  private static String STR_VAR_5 = "var5";
  private static String STR_VAR_6 = "var6";
  private static String STR_VAR_7 = "var7";
  private static String STR_VAR_8 = "var8";
  private static String STR_VAR_9 = "var9";
  private static String STR_VAR_10 = "var10";
  private static String STR_VAR_11 = "var11";
  private static String STR_VAR_12 = "var12";
  private static String STR_VAR_13 = "var13";
  private static String STR_VAR_14 = "var14";
  private static String STR_VAR_15 = "var15";
  private static String STR_VAR_16 = "var16";
  private static String STR_VAR_17 = "var17";
  private static String STR_VAR_18 = "var18";
  private static String STR_VAR_19 = "var19";
  private static String STR_VAR_20 = "var20";
  
  public static void main(String[] args) {
    /*
     *Assuming that the processing is lined up here ...
     *Assuming that the processing is lined up here ...
     *Assuming that the processing is lined up here ...
     *Assuming that the processing is lined up here ...
     *Assuming that the processing is lined up here ...
     *Assuming that the processing is lined up here ...
     *Assuming that the processing is lined up here ...
     *Assuming that the processing is lined up here ...
     *Assuming that the processing is lined up here ...
     *Assuming that the processing is lined up here ...
     *Assuming that the processing is lined up here ...
     *Assuming that the processing is lined up here ...
     *Assuming that the processing is lined up here ...
     *Assuming that the processing is lined up here ...
     *Assuming that the processing is lined up here ...
     */
    System.out.println(STR_VAR_1);
  }

}

By the way, on my laptop it looks like this: arrow_down: eclipse_070.png Yes, you can't see the processing part at all: sweat: I'll just ignore the fact that the laptop screen is small (laughs)

I want to split the screen and edit while looking at the top and bottom at the same time

In such a case, select `Menu Bar → Window → New Editor ```: exclamation: Depending on the version, it may be Menu Bar → Window → Editor → Clone ``. Then ... 002_080.png Two identical files are displayed: open_mouth:

After that, if you adjust the arrangement, you can edit while arranging side by side like this: pencil2: By the way, I added one line to the place indicated by the orange arrow on the right side. 003_070.png

Please do try that out.

If you know it, the implementation will proceed a little easier. Also, for a moment, people around me say "Wow!" (Laughs)

Recommended Posts

[Eclipse] I want to open the same file twice [Split editor]
I want to transition to the same screen in the saved state
I want to hook log file generation / open with log4j # FileAppender
I want to use DBViewer with Eclipse 2018-12! !!
I want to know the JSP of the open portlet when developing Liferay
I want to output the day of the week
I want to var_dump the contents of the intent
Double-click to open the jar file on Windows
I want to truncate after the decimal point
I want to get the value in Ruby
[Eclipse] I want to use the completion function, but I want to manage to confirm the completion with spaces.
[Java] I want to calculate the difference from the date
I want to embed any TraceId in the log
I want to judge the range using the monthly degree
I want to know the answer of the rock-paper-scissors app
I want to display the name of the poster of the comment
I want to monitor a specific file with WatchService
I want to place RadioButtons in the same RadioGroup at any position on the screen.
I want to call the main method using reflection
How to debug the generated jar file in Eclipse
[Rough commentary] I want to marry the pluck method
I want to be aware of the contents of variables!
I want to return the scroll position of UITableView!
I want to simplify the log output on Android
I want to add a delete function to the comment function
I want to find out which version of java the jar file I have is available
I want to get a list of the contents of a zip file and its uncompressed size
I want to control the maximum file size in file upload for each URL in Spring Boot
[Beginner] I want to modify the migration file-How to use rollback-
I want to set the conditions to be displayed in collection_check_boxes
[Rails] [bootstrap] I want to change the font size responsively
I want to use screen sharing on the login screen on Ubuntu 18
(´-`) .. oO (I want to easily find the standard output "Hello".
I want to bring Tomcat to the server and start the application
I want to expand the clickable part of the link_to method
I want to change the log output settings of UtilLoggingJdbcLogger
I want to use the Java 8 DateTime API slowly (now)
I want to create a form to select the [Rails] category
I want to use the sanitize method other than View.
I want to put the JDK on my Mac PC
I want to give a class name to the select attribute
I want to create a Parquet file even in Ruby
I want to recursively search the class list under the package
I want to distinct the duplicated data with has_many through
I want to narrow down the display of docker ps
I want to return multiple return values for the input argument
[Ruby] I want to reverse the order of the hash table
I want to temporarily disable the swipe gesture of UIPageViewController
I want to pass the startup command to postgres with docker-compose.
I want to simplify the conditional if-else statement in Java
I want to convert characters ...
[Spring Boot] I want to add my own property file and get the value with env.getProperty ().
I want to give edit and delete permissions only to the poster
I want to create a chat screen for the Swift chat app!
I want to understand the flow of Spring processing request parameters
I just want to write Java using Eclipse on my Mac
The story of Collectors.groupingBy that I want to keep for posterity
If you want to change the Java development environment from Eclipse
I tried to translate the error message when executing Eclipse (Java)
I want to limit the input by narrowing the range of numbers
I want to add the disabled option to f.radio_button depending on the condition