mirror of
				https://github.com/vim/vim.git
				synced 2025-10-31 09:57:14 -04:00 
			
		
		
		
	- Obtain and pass through translated messages with this function. - If "g:java_foldtext_show_first_or_second_line" is defined, assign this function to &foldtext. closes: #15549 Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
		
			
				
	
	
		
			99 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Java
		
	
	
	
	
	
			
		
		
	
	
			99 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Java
		
	
	
	
	
	
| // VIM_TEST_SETUP setlocal foldenable foldcolumn=2 foldmethod=syntax
 | |
| // VIM_TEST_SETUP let g:java_foldtext_show_first_or_second_line = 1
 | |
| 
 | |
| 	@SuppressWarnings({
 | |
| 	"""
 | |
| 	bespoke
 | |
| 	/*
 | |
| 	 *
 | |
| 	 */
 | |
| 	/**
 | |
| 	 *
 | |
| 	 */
 | |
| 	//
 | |
| 	//
 | |
| 	//
 | |
| 	{
 | |
| 	}
 | |
| """
 | |
| })
 | |
| class FoldingTests {
 | |
| 	interface Foldenable
 | |
| 	{
 | |
| 	}
 | |
| 
 | |
| 	static {
 | |
| 		new Object() {
 | |
| 			{
 | |
| 				{
 | |
| 					new Object() {{{
 | |
| 						new Object() {{{}}};
 | |
| 					}}};
 | |
| 				}
 | |
| 			}
 | |
| 		};
 | |
| 
 | |
| 		switch (0) {
 | |
| 			case 0:
 | |
| 			case 1: {
 | |
| 				break;
 | |
| 			}
 | |
| 			default: ;
 | |
| 		}
 | |
| 	}
 | |
| 
 | |
| 	{ Object bb = ((Object) new byte[]{}); }
 | |
| 	{
 | |
| out: {
 | |
| 		do {
 | |
| 			if (true)
 | |
| 				break out;
 | |
| 		} while (false);
 | |
| }
 | |
| 	}
 | |
| /*\\\*/	{
 | |
| 		(new java.util.function.Function<Object, Object>() {
 | |
| 			/**
 | |
| 			 * {@inheritDoc} */
 | |
| 			public Object apply(Object o) { return o; };
 | |
| 		}).apply(
 | |
| 		(new java.util.function.Function<Object, Object>() {
 | |
| 			/** {@inheritDoc}
 | |
| 			 */
 | |
| 			public Object apply(Object o) { return o; };
 | |
| 		}));
 | |
| 	}
 | |
| 
 | |
| 	/**
 | |
| 	 * No operation.
 | |
| 	 */
 | |
| 	void noOp1() { }
 | |
| 	/** No operation. */
 | |
| 	void noOp2()
 | |
| 	{
 | |
| 	}
 | |
| 	/** No operation. */
 | |
| 	void noOp3() {
 | |
| 	}
 | |
| 	/** No operation. */
 | |
| 	void noOp4() {
 | |
| 	/*/\/\/\*/ ; }
 | |
| }
 | |
| 
 | |
| /*
 | |
|  * Some note.
 | |
|  * {
 | |
|  * }
 | |
|  */
 | |
| /**
 | |
|  * A summary.
 | |
|  * {
 | |
|  * }
 | |
|  */
 | |
| //
 | |
| // {
 | |
| // }
 | |
| 
 | |
| /* 122|..........................................................................................*/ interface Foldenable {
 | |
| }
 |