100+ results for 'gets'

Not the results you expected?

socket.cpp (https://bitbucket.org/ewfiseli/elib.git) C++ · 365 lines

343

344 ::socklen_t len = sizeof(::sockaddr_in);

345 int ret = ::getsockname(

346 s.raw_socket()

347 , reinterpret_cast<::sockaddr*>(&in)

scl_memmgr.cc (https://bitbucket.org/vrrm/brl-cad-copy-for-fast-history-browsing-in-git.git) C++ · 410 lines

65 std::string getsrcfile( void ) const;

66 unsigned int getsrcline( void ) const;

67 };

68

186 irecord != _records.end();

187 irecord ++ ) {

188 scl_memmgr_error error( irecord->getsrcfile(), irecord->getsrcline() );

189 ierror = errors.find( error );

190 if( ierror == errors.end() ) {

202 ierror ++ ) {

203 // todo: generate error for memory leak

204 printf( "scl_memmgr warning: Possible memory leak in %s line %d\n", ierror->getsrcfile().c_str(), ierror->getsrcline() );

205 }

206

258 } else {

259 // Update stats

260 _allocated -= record->getsize();

261 _deallocated_total += record->getsize();

TextAreaOptionPane.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 253 lines ✨ Summary

This Java code defines a GUI component for editing text editor settings. It creates a window with various checkboxes, color pickers, and dropdown menus to configure font, colors, anti-aliasing, and other text editor options. The settings are saved when the user clicks “Save” or closes the window.

154 public void actionPerformed(ActionEvent evt)

155 {

156 int idx = antiAlias.getSelectedIndex();

157 font.setAntiAliasEnabled(idx > 0);

158 font.repaint();

187

188 jEdit.setColorProperty("view.fgColor",foregroundColor

189 .getSelectedColor());

190 jEdit.setColorProperty("view.bgColor",backgroundColor

191 .getSelectedColor());

194 jEdit.setBooleanProperty("view.thickCaret",thickCaret.isSelected());

195 jEdit.setColorProperty("view.caretColor",caretColor

196 .getSelectedColor());

197 jEdit.setColorProperty("view.selectionColor",selectionColor

198 .getSelectedColor());

itkCenteredTransformInitializerTest.cxx (https://github.com/chrismullins/ITK.git) C++ · 392 lines

49

50 const typename FixedImageType::RegionType & fixedRegion = fixedImage->GetLargestPossibleRegion();

51 const typename FixedImageType::SizeType & fixedSize = fixedRegion.GetSize();

52 const typename FixedImageType::IndexType & fixedIndex = fixedRegion.GetIndex();

53 ContinuousIndexType fixedCenterIndex;

61

62 const typename MovingImageType::RegionType & movingRegion = movingImage->GetLargestPossibleRegion();

63 const typename MovingImageType::SizeType & movingSize = movingRegion.GetSize();

64 const typename MovingImageType::IndexType & movingIndex = movingRegion.GetIndex();

65 ContinuousIndexType movingCenterIndex;

188

189 const RegionType & region = image->GetLargestPossibleRegion();

190 const SizeType & size = region.GetSize();

191 const IndexType & index = region.GetIndex();

192

instmgr.cc (https://bitbucket.org/vrrm/brl-cad-copy-for-fast-history-browsing-in-git.git) C++ · 413 lines

346

347 SDAI_Application_instance *

348 InstMgr::GetSTEPentity( int index ) {

349 MgrNode * mn = ( MgrNode * )( *master )[index];

350 if( mn ) {

385

386 SDAI_Application_instance *

387 InstMgr::GetSTEPentity( const char * entityKeyword, int starting_index ) {

388 MgrNode * node;

389 SDAI_Application_instance * se;

404

405 void *

406 InstMgr::GetSEE( int index ) {

407 MgrNode * mn = ( MgrNode * )( *master )[index];

408 if( mn ) {

vtkBoxWidget2.cxx (https://github.com/dgobbi/VTK.git) C++ · 332 lines

32 vtkBoxWidget2::vtkBoxWidget2()

33 {

34 this->WidgetState = vtkBoxWidget2::Start;

35 this->ManagesCursor = 1;

36

107 !self->CurrentRenderer->IsInViewport(X,Y) )

108 {

109 self->WidgetState = vtkBoxWidget2::Start;

110 return;

111 }

152

153 // We are definitely selected

154 self->WidgetState = vtkBoxWidget2::Active;

155 self->GrabFocus(self->EventCallbackCommand);

156

msp432_startup_ewarm.c (https://gitlab.com/21mece13/FreeRTOS) C · 300 lines

224 //*****************************************************************************

225 //

226 // This is the code that gets called when the processor first starts execution

227 // following a reset event. Only the absolutely necessary set is performed,

228 // after which the application supplied entry() routine is called. Any fancy

248 //*****************************************************************************

249 //

250 // This is the code that gets called when the processor receives a NMI. This

251 // simply enters an infinite loop, preserving the system state for examination

252 // by a debugger.

266 //*****************************************************************************

267 //

268 // This is the code that gets called when the processor receives a fault

269 // interrupt. This simply enters an infinite loop, preserving the system state

270 // for examination by a debugger.

SOCK_Connector.cpp (https://gitlab.com/wis-junior-dev/wis-junior-dev) C++ · 350 lines

123 // which will immediately return with the handle in an

124 // error state. The error code is then retrieved with

125 // getsockopt(). Good sockets however will return from

126 // the select() with ETIME - in this case return

127 // EWOULDBLOCK so the wait strategy can complete the

flymake-css.el (https://bitbucket.org/shuangxinyu/emacspack.git) Lisp · 162 lines

138

139 This function replaces numeric entities in the input STRING and

140 returns the modified string. For example \"&#42;\" gets replaced

141 by \"*\"."

142 (if (and string (stringp string))

LipstikComboBoxButton.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 241 lines ✨ Summary

This Java code defines a custom JButton subclass, LipstikComboBoxButton, which extends the functionality of a standard button to work with a JComboBox. It paints the button’s icon and background, handling 3D settings and transparency, and also renders the selected item from the combo box. The button is designed to be used in a custom look-and-feel theme.

150 Component c = renderer.getListCellRendererComponent(

151 listBox,

152 comboBox.getSelectedItem(),

153 -1,

154 getModel().isPressed(),

ShortcutsOptionPane.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 443 lines ✨ Summary

This Java code creates a graphical user interface (GUI) for managing shortcuts in an application. It allows users to add, edit, and delete shortcuts, with options to customize their names and shortcuts. The GUI displays a table of existing shortcuts, enabling users to modify them as needed. The code also saves changes to the shortcuts when the user clicks “OK”.

265 public void mouseClicked(MouseEvent evt)

266 {

267 int row = keyTable.getSelectedRow();

268 int col = keyTable.getSelectedColumn();

276 if(gkd.isOK())

277 filteredModel.setValueAt(

278 gkd.getShortcut(),row,col);

279 }

280 }

286 {

287 ShortcutsModel newModel

288 = (ShortcutsModel)selectModel.getSelectedItem();

289 if(filteredModel.getDelegated() != newModel)

290 {

291 jEdit.setIntegerProperty("options.shortcuts.select.index", selectModel.getSelectedIndex());

292 filteredModel.setDelegated(newModel);

293 setFilter();

test_pkgutil.py (https://bitbucket.org/tarek/distutils2/) Python · 609 lines ✨ Summary

This is a Python script that tests the functionality of the pkgutil module, which provides tools for working with Python packages and distributions. The test suite checks various aspects of the module’s behavior, including parsing package metadata, finding distributions, and handling obsolete versions. It ensures that the module behaves correctly in different scenarios.

198 path = relpath(file, sys.prefix)

199 digest = get_hexdigest(file)

200 size = os.path.getsize(file)

201 return [path, digest, size]

202

launcher-guide.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 593 lines

117 Before committing changes to the command line parameters,

118 <command>jedit.exe</command> validates the paths for the Java

119 and jEdit targets as well as the working directory. It will complain if

120 the paths are invalid. It will not validate command line options, but it

121 will warn you if it finds the <userinput>-noserver</userinput> option

actions.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 45 lines

30 // JOptionPane.showMessageDialog(view, "Got Project Viewer");

31 String s = "";

32 List list = pv.getSelectedFilePaths();

33 if (list !=null) {

34 ListIterator iter = list.listIterator();

ImportDialog.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 270 lines ✨ Summary

This Java code creates a dialog box for importing data into a version control system, specifically Subversion (SVN). The dialog allows users to input the URL of the SVN repository, the local directory to import from, and their username and password. Once entered, the user can click “OK” to generate a CopyData object containing the necessary information for importing the data into the SVN repository.

127 new ActionListener() {

128 public void actionPerformed( ActionEvent ae ) {

129 String selection = burp.getSelectionPath();

130 dialog.setVisible( false );

131 dialog.dispose();

description.html (https://freespeech.svn.sourceforge.net/svnroot/freespeech) HTML · 530 lines ✨ Summary

This is a technical documentation of an acoustic speech recognition system, written in HTML format. It outlines the system’s components, including data collection, front-end processing, decoding, and integration with audio servers. The document also includes a to-do list for future development and maintenance tasks.

317 5.2.3 Training</H4>

318 (given utterance, HMM-graph)

319 <P>1. produce targets for the states (Baum-Welch, Viterbi)

320 <BR>2. accumulate statistics, weighted by targets

PluginManagerProgress.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 189 lines ✨ Summary

This Java code creates a dialog window that displays the progress of plugin downloads. It uses a separate thread to perform the download operations in the background, updating the progress bar and displaying a “stop” button to cancel the operation. When the download is complete, it closes the dialog window. The dialog is designed to be used with a plugin manager application.

141 public void actionPerformed(ActionEvent evt)

142 {

143 if(evt.getSource() == stop)

144 {

145 thread.stop();

MouseOptionPane.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 154 lines ✨ Summary

This Java code defines a custom options panel for a text editor, specifically for mouse-related settings. It allows users to configure various mouse actions, such as dragging and dropping text, joining non-word characters, pasting from middle mouse button clicks, and modifying gutter click behavior. The settings are saved when the user closes the options panel.

127 for(int i = 0; i < c; i++)

128 {

129 int idx = gutterClickActions[i].getSelectedIndex();

130 jEdit.setProperty("view.gutter."+clickModifierKeys[i],

131 clickActionKeys[idx]);

LCMOptions.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 135 lines ✨ Summary

This Java code defines a plugin options pane for a text editor, specifically for managing dirty line providers. It allows users to select a provider from a dropdown list and view its specific options in a panel. The selected provider’s options are saved when the user clicks “Save”. The code uses a combination of Swing components and service management to interact with the text editor.

52 protected void _init()

53 {

54 String [] services = ServiceManager.getServiceNames(

55 DirtyLineProvider.class.getCanonicalName());

56 provider = new JComboBox(services);

82 if (currentPanel != null)

83 currentPanel.setVisible(false);

84 int providerIndex = provider.getSelectedIndex();

85 DirtyLineProviderOptions opts = providerOptions[providerIndex];

86 if (opts == null)

87 {

88 String selectedName = provider.getSelectedItem().toString();

89 DirtyLineProvider selProvider= (DirtyLineProvider)

90 ServiceManager.getService(

LaunchConfigOptionPane.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 239 lines ✨ Summary

This Java code creates a graphical user interface (GUI) for managing launch configurations in a debugger program. It allows users to create, edit, duplicate, and delete launch configurations, as well as set default configurations. The GUI displays a list of existing configurations and provides buttons for various actions.

171 {

172 int prevDefault = configs.getDefaultIndex();

173 int defaultIndex = configurationsList.getSelectedIndex();

174 configs.setDefaultIndex(defaultIndex);

175 // These are required for updating the display

181 private void deleteSelectedConfiguration()

182 {

183 int index = configurationsList.getSelectedIndex();

184 configs.remove(index);

185 Vector<String> configNames = configs.getNames();

193 private void editSelectedConfiguration()

194 {

195 int index = configurationsList.getSelectedIndex();

196 if (index > -1) {

197 currentConfig = configs.getByIndex(index);

ova.html (http://flowplayer-core.googlecode.com/svn/) HTML · 121 lines ✨ Summary

This HTML code sets up a basic Flowplayer video player with various plugins and settings, such as auto-playing videos, controls, and fullscreen toggle functionality. It also includes custom plugins like SMIL and OVA for handling video metadata and ads. The code is designed to play a specific video from a URL and provides options for controlling the playback experience.

109 does not affect on Flowplayer functionality

110 <button type="button" onclick="info($f()._api().fp_getVersion());">get version</button>

111 <button type="button" onclick="info($f().getStatus().time);">show time3</button>

112 <button type="button" onclick="info($f().getState());">get state</button>

SessionChanged.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 49 lines ✨ Summary

This Java class, SessionChanged, represents an edit bus message that notifies of a session change. It extends another class, SessionMessage, and takes four parameters in its constructor: the source component, old and new sessions, and the current session. The class provides a method to retrieve the current session.

37

38

39 public final Session getSession()

40 {

41 return session;

OAVSProjectItem.cs (git://github.com/saidai-no/nemerle.git) C# · 80 lines ✨ Summary

This C# code defines a class OAVSProjectItem that represents a language-specific project item in Visual Studio. It inherits from VSProjectItem and provides properties to access related objects, such as the containing project, DTE instance, and custom tool functionality. The class is designed for use with the Visual Studio SDK and is licensed under the Visual Studio SDK license terms.

50 public virtual DTE DTE

51 {

52 get { return (DTE)this.fileNode.ProjectMgr.Site.GetService(typeof(DTE)); }

53 }

54

TemplateDockable.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 233 lines ✨ Summary

This Java code defines a TemplateDockable class that extends JPanel. It creates a dockable template tree component with features like mouse click actions, keyboard shortcuts, and edit functionality. The component interacts with the jEdit text editor and provides options for editing templates, setting accelerators, and reloading templates.

103 {

104 TemplatesPlugin plugin = (TemplatesPlugin) jEdit.getPlugin("templates.TemplatesPlugin");

105 plugin.processTemplate(templates.getSelectedTemplate(), view, view.getTextArea());

106 view.getEditPane().getTextArea().requestFocus();

107 }

166 if ((evt.getModifiers() & MouseEvent.BUTTON1_MASK) != 0 && evt.getClickCount() == 1) {

167 TreePath path = templates.getPathForLocation(evt.getX(), evt.getY());

168 if (templates.isLastPathComponentATemplate(path) && path.equals(templates.getSelectionPath())) {

169 processSelectedTemplate();

170 }

184 } else if (EDIT.equals(evt.getActionCommand())) {

185 jEdit.openFile(view, MiscUtilities.concatPath(TemplatesPlugin.getTemplateDir(),

186 templates.getSelectedTemplate()));

187 } else if (SET_ACCELERATOR.equals(evt.getActionCommand())) {

188 String mode =

MiscUtilities.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 1332 lines ✨ Summary

This Java code is part of a file system utility, specifically handling environment variable expansion and compression. It maps certain directory prefixes to their corresponding environment variables, compressing paths by replacing them with these variables. The VarCompressor class uses a reverse mapping to quickly replace paths with their prefixed versions, allowing for efficient expansion in the future.

720 encoding = System.getProperty("file.encoding");

721 else

722 encoding = buffer.getStringProperty(JEditBuffer.ENCODING);

723 boolean gzipped = false;

724

978 * <li><i>java.home</i>/lib/. In this case, tools.jar is added to

979 * jEdit's list of known jars using jEdit.addPluginJAR(),

980 * so that it gets loaded through JARClassLoader.

981 * </ol><p>

982 *

SyntaxHiliteOptionPane.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 306 lines ✨ Summary

This Java code defines a GUI option pane for syntax highlighting settings, allowing users to customize font colors and styles for different programming languages. It uses a table with two columns to display options and their corresponding values, which are stored in a configuration file. The user can select new options and save them to the configuration file.

124 SyntaxHiliteOptionPane.this);

125 if (dialog != null)

126 style = new StyleEditor(dialog, current, token).getStyle();

127 else

128 {

129 View view = GUIUtilities.getView(SyntaxHiliteOptionPane.this);

130 style = new StyleEditor(view, current, token).getStyle();

131 }

132 if(style != null)

223 .get(i);

224 jEdit.setProperty(ch.property,

225 GUIUtilities.getStyleString(ch.style));

226 }

227 } //}}}

DefaultInputHandler.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 246 lines ✨ Summary

This Java class, DefaultInputHandler, is a default implementation of an input handler for a text editor. It maps keystrokes to actions and inserts key typed events into the text area. It handles various keyboard inputs, including modifier keys, and invokes actions based on user input. The class also manages key bindings and prefix keys, providing a basic framework for handling user input in a text editing application.

94 public void setCurrentBindings(Hashtable bindings)

95 {

96 view.getStatus().setMessage((String)bindings.get(PREFIX_STR));

97 currentBindings = bindings;

98 } //}}}

140 {

141 readNextChar = null;

142 view.getStatus().setMessage(null);

143 }

144 }

216 } //}}}

217

218 //{{{ getSymbolicModifierName() method

219 /**

220 * Returns a the symbolic modifier name for the specified Java modifier

JEditTextArea.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 643 lines ✨ Summary

This Java code defines a text area component with various features, including folding, popup menus, and caret management. It handles user interactions such as right-clicking, scrolling, and keyboard input to provide a customizable editing experience. The code also integrates with other plugins and services, allowing for advanced functionality like syntax highlighting and code completion.

395 return caret;

396

397 return getSelection(0).getStart();

398 } //}}}

399

446 public final int getSelectionEnd()

447 {

448 return getSelectionCount() == 1 ? getSelection(0).getEnd() : caret;

449

450 } //}}}

485 public final void setSelectionEnd(int selectionEnd)

486 {

487 int selectionStart = getSelectionCount() == 1 ? getSelection(0).getStart() : caret;

488 setSelection(new Selection.Range(selectionStart, selectionEnd));

489 moveCaretPosition(selectionEnd,true);

CMakeLists.txt (git://github.com/hpcc-systems/HPCC-Platform.git) CMake · 53 lines ✨ Summary

This CMake code defines a build configuration for an executable named updtdalienv. It specifies the source files, includes necessary directories and libraries, and sets up the build process to create an executable from the specified sources. The resulting executable is installed in a specific directory with its runtime destination set accordingly.

44

45 HPCC_ADD_EXECUTABLE ( updtdalienv ${SRCS} )

46 install ( TARGETS updtdalienv RUNTIME DESTINATION ${EXEC_DIR} )

47 target_link_libraries ( updtdalienv

48 jlib

Delete.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 69 lines ✨ Summary

This Java class handles the deletion of items from a Subversion (SVN) repository. When an item is selected and the “Delete” action is performed, it extracts the paths to the selected items, creates a DeleteData object with these paths, and then calls the DeleteAction to perform the actual deletion.

40

41 public void actionPerformed( ActionEvent ae ) {

42 TreePath[] tree_paths = tree.getSelectionPaths();

43 if ( tree_paths.length == 0 ) {

44 return ;

ExtendedGridLayout.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 1225 lines ✨ Summary

This Java class is a layout manager for components in a graphical user interface (GUI). It determines how to arrange and size components within a container, such as a panel or frame. The class takes several parameters, including horizontal and vertical gaps, border distances, and a comptable flag, to customize its behavior.

174

175 /**

176 * An enum to tell the {@code getSize()} method which size is requested.

177 *

178 * @see #getSize()

351 Set<ExtendedGridLayoutConstraints> rowspans = new HashSet<ExtendedGridLayoutConstraints>();

352 Dimension gridSize = buildGrid(parent,gridRows,colspans,rowspans);

353 return getSize(parent,LayoutSize.MINIMUM,false,gridSize,gridRows,colspans,rowspans,new int[0][0]);

354 }

355 }

372 Set<ExtendedGridLayoutConstraints> rowspans = new HashSet<ExtendedGridLayoutConstraints>();

373 Dimension gridSize = buildGrid(parent,gridRows,colspans,rowspans);

374 return getSize(parent,LayoutSize.PREFERRED,false,gridSize,gridRows,colspans,rowspans,new int[0][0]);

375 }

376 }

pl.UTF-8.po (https://bitbucket.org/ultra_iter/vim-qt.git) Portable Object · 6525 lines

414 msgstr "E461: Niedozwolona nazwa zmiennej: %s"

415

416 msgid "E687: Less targets than List items"

417 msgstr "E687: Mniej celów niż elementów Listy"

418

419 msgid "E688: More targets than List items"

420 msgstr "E688: Więcej celów niż elementów Listy"

421

ShortcutPrefixActiveEvent.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 145 lines ✨ Summary

This Java class, ShortcutPrefixActiveEvent, is an event class that notifies listeners when a shortcut prefix becomes active or inactive in a text editor. It extends ChangeEvent and provides methods to add and remove listener objects, as well as fire the event with the current state of the shortcut prefix.

121 //{{{ getBindings()

122 /**

123 * Gets the bindings attribute of the ShortcutPrefixActiveEvent object

124 *

125 *@return The bindings value

132 //{{{ getActive()

133 /**

134 * Gets the active attribute of the ShortcutPrefixActiveEvent object

135 *

136 *@return The active value

CBListCellRenderer.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 176 lines ✨ Summary

This Java code defines a custom JListCellRenderer class, CBListCellRenderer, which displays information about buffers in a file system view. It renders the buffer name with its assigned color and path, truncated to fit within the cell width, with an ellipsis if necessary. The renderer also indicates whether the buffer is saved or has unsaved changes, and highlights selected buffers in bold font.

85 Font f=UIManager.getFont("Tree.font");

86 if(selected) f=f.deriveFont(Font.BOLD);

87 Font fi=f.deriveFont((selected)?Font.BOLD|Font.ITALIC:Font.ITALIC,f.getSize()-1);

88 FontRenderContext frc=new FontRenderContext(null,true,false);

89

91 int baseline=2+(int)Math.ceil(lm.getAscent());

92

93 Rectangle2D r2d=f.getStringBounds(" ",frc);

94 int spacesWidth=(int)Math.ceil(r2d.getWidth());

95 r2d=fi.getStringBounds("...",frc);

103 if(idx>0) path=path.substring(0,idx);

104

105 r2d=f.getStringBounds(name,frc);

106 int nl=(int)Math.ceil(r2d.getWidth());

107 r2d=fi.getStringBounds(path,frc);

PHPItem.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 65 lines ✨ Summary

This is a Java interface definition for a PHPItem, which represents an item in a PHP project. It defines constants and methods to describe the type, name, location, and other properties of the item. The interface provides a way to access and manipulate this information, likely used in a parser or editor for PHP projects.

51 String getNameLowerCase();

52

53 int getSourceStart();

54

55 int getBeginLine();

StructureMatcher.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 240 lines ✨ Summary

This Java code defines an interface StructureMatcher for matching parts of a source file’s structure, such as brackets. It provides default implementations for bracket matching and highlights the matched structure in a text area. The interface also includes methods for selecting from the caret to the matching structure element.

142 return;

143

144 Match match = textArea.getStructureMatch();

145 if(match != null)

146 {

154 int x1, x2;

155

156 int matchStartLine = textArea.getScreenLineOfOffset(

157 match.start);

158 int matchEndLine = textArea.getScreenLineOfOffset(

165 else

166 {

167 x1 = textArea.getScreenLineStartOffset(

168 screenLine);

169 }

RangeHighlighterImpl.java (https://bitbucket.org/nbargnesi/idea.git) Java · 228 lines

224 @Override

225 public String toString() {

226 return "RangeHighlighter: ("+getStartOffset()+","+getEndOffset()+"); layer:"+getLayer()+"; tooltip: "+getData().getErrorStripeTooltip();

227 }

228 }

ExportDialog.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 285 lines ✨ Summary

This Java code creates a graphical user interface (GUI) for exporting data from an application to a file. The GUI allows users to select files, choose export options such as recursive and revision selection, and specify end-of-line style. Once options are set, the user can click “Export” to save the data to a file.

69 throw new IllegalArgumentException( "data cannot be null" );

70 }

71 if ( data.getSourceFiles() == null && data.getSourceURLs() == null ) {

72 throw new IllegalArgumentException( "no source file(s) to copy" );

73 }

83 // source for export

84 List paths;

85 if ( data.getSourceFiles() != null ) {

86 paths = data.getSourceFiles();

87 }

88 else {

89 paths = data.getSourceURLs();

90 }

91

125

126 // revision selection panels

127 revision_panel = new RevisionSelectionPanel( "Export from this revision:", SwingConstants.VERTICAL, data.getSourceURLs() == null );

128 peg_revision_panel = new RevisionSelectionPanel( "Using this peg revision:", SwingConstants.VERTICAL, false, false, true, false, false );

129

MergeResultsPanel.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 150 lines ✨ Summary

This Java code creates a graphical user interface (GUI) panel to display the results of a dry-run merge operation in a Subversion version control system. It shows the files that have conflicts, additions, deletions, merges, skips, and updates, with collapsible nodes for each category. The GUI is designed to be used within the JEdit text editor.

92 }

93

94 list = results.getSkipped();

95 if ( list != null ) {

96 root.add( createNode( jEdit.getProperty("ips.Skipped_files>", "Skipped files:"), list ) );

LineElement.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 112 lines ✨ Summary

This Java class, LineElement, represents a single line of text in a document. It provides methods to access information about the line, such as its start and end offsets, and is used for backwards compatibility with an older version of the jEdit 3.2.2-style document model. The class implements the Element interface and has private members to store the buffer and line number associated with it.

69 } //}}}

70

71 //{{{ getStartOffset() method

72 public int getStartOffset()

EnhancedButton.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 103 lines ✨ Summary

This Java class, EnhancedButton, extends RolloverButton to create a custom toolbar button with enhanced functionality. It sets up an action listener and mouse handler to display a message when the button is hovered over, and resets the message when the mouse is released. The button’s enabled state is also determined by its associated action context.

73 if(msgSet)

74 {

75 GUIUtilities.getView((Component)evt.getSource())

76 .getStatus().setMessage(null);

84 if(msg != null)

85 {

86 GUIUtilities.getView((Component)evt.getSource())

87 .getStatus().setMessage(msg);

94 if(msgSet)

95 {

96 GUIUtilities.getView((Component)evt.getSource())

97 .getStatus().setMessage(null);

VFSFileChooserDialog.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 596 lines ✨ Summary

This Java code is a part of a file manager application, specifically a dialog box for selecting files. It handles user input, updates the file name field, and checks if the selected file exists before proceeding with further actions. The dialog box also displays a progress bar while waiting for the file system to respond.

128 public void ok()

129 {

130 VFSFile[] files = browser.getSelectedFiles();

131 filename = filenameField.getText();

132 boolean choosingDir = (browser.getMode() ==

223 } //}}}

224

225 //{{{ getSelectedFiles() method

226 public String[] getSelectedFiles()

231 if(browser.getMode() == VFSBrowser.CHOOSE_DIRECTORY_DIALOG)

232 {

233 if(browser.getSelectedFiles().length > 0)

234 {

235 return getSelectedFiles(VFSFile.DIRECTORY,

246 }

247 else

248 return getSelectedFiles(VFSFile.FILE,VFSFile.FILE);

249 } //}}}

250

build.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 108 lines

10 The 'dist' target compiles the plugin, generates documentation, and creates

11 the JAR file. Before running the 'dist' target, you will need to choose

12 whether to generate the documentation using one of these two targets:

13

14 - 'docs-xsltproc': Creates documentation using the xsltproc tool from

RESearchMatcher.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 180 lines ✨ Summary

This Java class, RESearchMatcher, implements a regular expression string matcher for the jEdit text editor. It allows users to search and replace text in a buffer using Perl5 syntax with character classes enabled. The class provides methods for searching, replacing, and substituting text, as well as handling special cases such as matching from the start or end of the buffer.

109 return null;

110

111 int _start = match.getStartIndex();

112 int _end = match.getEndIndex();

113

130 else

131 {

132 _start = match.getStartIndex() + 1;

133 _end = match.getEndIndex() + 1;

134 }

Type.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 694 lines ✨ Summary

This Java class appears to be a part of the Java Virtual Machine (JVM) implementation, specifically for handling primitive types and method invocation. It provides methods for computing the size of values of different types, adapting JVM instruction opcodes to these types, and determining the opcode for specific instructions like IALOAD or IREM.

35

36 /**

37 * The sort of the <tt>void</tt> type. See {@link #getSort getSort}.

38 */

39

41

42 /**

43 * The sort of the <tt>boolean</tt> type. See {@link #getSort getSort}.

44 */

45

47

48 /**

49 * The sort of the <tt>char</tt> type. See {@link #getSort getSort}.

50 */

51

SessionPropertyChanged.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 93 lines ✨ Summary

This Java class represents a message that is sent when a session property changes, such as a user’s name or preferences. It extends an existing EBMessage class and adds properties specific to session changes, including the source component, session object, old and new values of the changed property, and methods for accessing these properties.

46

47

48 public final SessionManager getSessionManager()

49 {

50 return (SessionManager) getSource();

52

53

54 public final Session getSession()

55 {

56 return session;

Constants.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 274 lines ✨ Summary

This is a table of values for the visitInsn method, which appears to be part of the Java Virtual Machine (JVM) specification. It maps integer codes to their corresponding bytecode instructions, providing a reference for developers working with JVMs. The codes represent various operations, such as arithmetic, comparison, and control flow instructions.

247 int ARETURN = 176; // -

248 int RETURN = 177; // -

249 int GETSTATIC = 178; // visitFieldInsn

250 int PUTSTATIC = 179; // -

251 int GETFIELD = 180; // -

MainViewModel.cs (https://hg01.codeplex.com/mvvmlight) C# · 75 lines ✨ Summary

This C# code defines a MainViewModel class that exposes a single property, WelcomeTitle, which is bound to data retrieved from an IDataService. The view model initializes with an instance of IDataService and uses it to fetch data when the view is loaded, updating the WelcomeTitle property accordingly.

10 /// </para>

11 /// <para>

12 /// See http://www.galasoft.ch/mvvm/getstarted

13 /// </para>

14 /// </summary>

25

26 /// <summary>

27 /// Gets the WelcomeTitle property.

28 /// Changes to that property's value raise the PropertyChanged event.

29 /// </summary>

BibTeXTablePanel.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 167 lines ✨ Summary

This Java code defines a panel for displaying and editing BibTeX entries within a LaTeX editor. It creates a table to display the entries, allows users to select multiple entries and insert them into the current document with formatting options. The panel is designed to be used in conjunction with other tools and features of the LaTeX editor.

145 }

146

147 int[] sels = table.getSelectedRows();

148 StringBuffer sb = new StringBuffer();

149

LogTypeParser.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 388 lines ✨ Summary

This Java code processes XML data to create a log type object, populating its properties from the XML elements and attributes. It iterates through the XML tree, extracting values for log type properties such as column names, widths, offsets, and delimiters. The resulting log type object is then added to an ArrayList, which is returned by the method.

13

14 /**

15 * Gets the default LogType to use when no other LogTypes are found.

16 *

17 * @return The default LogType value

ReferencePanel.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 193 lines ✨ Summary

This Java code defines a ReferencePanel class that extends an Abstract Tool Panel. It provides functionality for inserting cross-references in LaTeX documents, allowing users to browse and select references from a list. The panel updates dynamically as the user types, and allows users to insert the selected reference into their document with a single click.

159

160 private void insert() {

161 LaTeXAsset refTagPair = (LaTeXAsset)refList.getSelectedValue();

162 String ref = refTagPair.name;

163

177

178 private void visitLabel() {

179 LaTeXAsset asset = (LaTeXAsset)refList.getSelectedValue();

180 Buffer goToBuff = jEdit.openFile(view, asset.getFile().toString());

181 view.setBuffer(goToBuff);

tcl.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 458 lines

88 <KEYWORD1>file</KEYWORD1>

89 <KEYWORD1>flush</KEYWORD1>

90 <KEYWORD1>gets</KEYWORD1>

91 <KEYWORD1>glob</KEYWORD1>

92 <KEYWORD1>open</KEYWORD1>

Preview_Javadoc_of_Buffer.bsh (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 609 lines

61 /*

62 * Get_Class_Name.bsh - a BeanShell macro script for the

63 * jEdit text editor - gets class name from buffer name

64 * Copyright (C) 2001 John Gellene

65 * jgellene@nyc.rr.com

113 if(chooser.showDialog(view, "Okay") == JFileChooser.APPROVE_OPTION)

114 {

115 retVal = chooser.getSelectedFile().getAbsolutePath();

116 }

117 return retVal;

165 manager.addDockableWindow("console");

166 // Obtain the console instance

167 console.Shell _shell = console.Shell.getShell(shell);

168 _console = manager.getDockable("console");

169 // Ensure we are using the console shell

SVNInfoPanel.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 185 lines ✨ Summary

This Java code creates a graphical user interface (GUI) component that displays information about a file or directory from a version control system, such as Git. It fetches and formats various metadata, including timestamps, checksums, and conflict information, into a table for easy viewing. The GUI is designed to be compact and readable, with features like automatic row packing and mouse event handling.

108 info_table_model.addRow( new String[] {jEdit.getProperty("ips.Node_Kind", "Node Kind"), jEdit.getProperty("ips.unknown", "unknown")} );

109 }

110 if ( info.getSchedule() == null && !info.isRemote() ) {

111 info_table_model.addRow( new String[] {jEdit.getProperty("ips.Schedule", "Schedule"), jEdit.getProperty("ips.normal", "normal")} );

112 }

113 else if ( !info.isRemote() ) {

114 info_table_model.addRow( new String[] {jEdit.getProperty("ips.Schedule", "Schedule"), info.getSchedule() } );

115 }

116 if ( info.getAuthor() != null ) {

CVSEntriesFilter.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 196 lines ✨ Summary

This Java code defines a file filter for importing files into a project viewer. It checks if a file is listed in the CVS/Entries file and, if so, imports it. The filter also supports .svn/Entries files from Subversion version control systems. It caches entries to improve performance and provides options for customizing its behavior.

122 } catch (FileNotFoundException fnfe) {

123 // no CVS/Entries. Try .svn/Entries

124 getSubversionEntries(h, dirPath);

125 } catch (IOException ioe) {

126 //shouldn't happen

134 } //}}}

135

136 //{{{ -getSubversionEntries(String) : HashSet

137 private void getSubversionEntries(HashSet target, String dirPath) {

IgnoreDialog.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 172 lines ✨ Summary

This Java code creates a graphical user interface (GUI) dialog box for ignoring files and directories in a Subversion version control system. The dialog allows users to select whether to ignore specific files, directories, or patterns within directories, as well as enable recursive ignoring. It also includes options for canceling the operation and displaying the selected path, filename, pattern, and recursive status.

98 new ChangeListener() {

99 public void stateChanged( ChangeEvent ae ) {

100 AbstractButton btn = ( AbstractButton ) ae.getSource();

101 pattern_field.setEnabled( btn.isSelected() );

102 recursive_cb.setEnabled( btn.isSelected() );

build.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 126 lines

6 The 'dist' target compiles the plugin and creates the JAR file.

7 Before running the 'dist' target, you will need to generate the

8 documentation using one of these two targets:

9

10 - 'docs-xalan': Creates documentation using the Xalan XSLT processor

17 definition

18 - If necessary, change the list of files in the 'dist' targtet

19 - If necessary, change the 'docs-xalan' and 'docs-xsltproc' targets

20 accordingly.

21 -->

BrowseRepositoryPanel.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 972 lines ✨ Summary

This Java code creates a custom tree view component for displaying directories and their contents. It allows users to interact with the directory structure, including deleting files, locking/unlocking directories, and exporting data. The component also displays additional information such as external repository locations and properties. It uses a custom cell renderer to format the display of directory names and contents.

109 tree = new JTree( new DefaultTreeModel( new DirTreeNode( "SVN Browser", false ) ) );

110 tree.setCellRenderer( new CellRenderer() );

111 tree.getSelectionModel().setSelectionMode( TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION );

112 ToolTipManager.sharedInstance().registerComponent( tree );

113

120 DirTreeNode node = ( DirTreeNode ) path.getLastPathComponent();

121 if ( node.getChildCount() == 0 ) {

122 RepositoryData data = chooser.getSelectedRepository();

123 data = new RepositoryData( data );

124 String url;

158 // leaf nodes should be files, not directories.

159 // get url and path for the selected file

160 RepositoryData data = chooser.getSelectedRepository();

161 String url;

162 String filepath;

NodeRenamerAction.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 335 lines ✨ Summary

This Java code is part of a project that allows users to rename nodes (files, directories) within a project structure. It provides a dialog for inputting new names and includes options to prevent changes on disk. The code handles renaming files, directories, and projects, and updates the project structure accordingly.

74 /** Renames a node. */

75 public void actionPerformed(ActionEvent e) {

76 VPTNode node = viewer.getSelectedNode();

77 boolean isValid = false;

78 String newName = null;

304 //{{{ +actionPerformed(ActionEvent) : void

305 public void actionPerformed(ActionEvent ae) {

306 if (ae.getSource() == okBtn) {

307 ok();

308 } else {

PropertyAsset.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 23 lines ✨ Summary

This Java class represents a property asset, extending the Asset class. It holds a reference to a Property object and provides getter methods for its key, short string representation, and long string representation (as a string). The icon is not implemented, returning null. This class seems to be part of a larger system for managing properties or assets, possibly in a graphical user interface context.

15 public Icon getIcon() { return null; }

16

17 public String getShortString() { return property.getKey(); }

18

19 public String getLongString() { return property.toString(); }

Interpreter.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 1205 lines ✨ Summary

This Java code defines a class for an interpreter, providing methods for setting up and managing the interpreter’s behavior, such as source files, output streams, and exit on end of input. It also includes de-serialization setup and provides access to various properties and settings. The code appears to be part of a larger system for executing and debugging Java scripts or programs.

178 this.parent = parent;

179 if ( parent != null )

180 setStrictJava( parent.getStrictJava() );

181 this.sourceFileInfo = sourceFileInfo;

182

Cut_Lines.bsh (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 42 lines

11

12 cutLines(){

13 selections = textArea.getSelectedLines();

14

15 if(selections.length == 0){

RecentFilesProvider.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 194 lines ✨ Summary

This Java code implements a menu provider for a text editor, specifically a “Recent Files” menu. It displays a list of recently opened files and allows users to navigate through them by typing file names in a search field. The menu also includes options to clear the recent files history and sort the list alphabetically.

60 {

61 jEdit.openFile(view,evt.getActionCommand());

62 view.getStatus().setMessage(null);

63 }

64 }; //}}}

70 public void mouseEntered(MouseEvent evt)

71 {

72 view.getStatus().setMessage(

73 ((JMenuItem)evt.getSource())

77 public void mouseExited(MouseEvent evt)

78 {

79 view.getStatus().setMessage(null);

80 }

81 };

88 public void stateChanged(ChangeEvent e)

89 {

90 JMenuItem menuItem = (JMenuItem) e.getSource();

91

92 view.getStatus().setMessage(menuItem.isArmed()?menuItem.getActionCommand():null);

BufferOptionPane.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 339 lines ✨ Summary

This Java code creates a GUI dialog for editing settings of a text editor. It allows users to select various options such as line ending, encoding, compression, and formatting preferences. The selected values are then saved back to the application’s configuration. The dialog also includes buttons for saving changes and possibly canceling or applying other actions.

82 jEdit.getProperty("lineSep.mac") };

83 lineSeparator = new JComboBox(lineSeps);

84 String lineSep = buffer.getStringProperty(JEditBuffer.LINESEP);

85 if(lineSep == null)

86 lineSep = System.getProperty("line.separator");

100 encoding = new JComboBox(encodings);

101 encoding.setEditable(true);

102 encoding.setSelectedItem(buffer.getStringProperty(JEditBuffer.ENCODING));

103 addComponent(jEdit.getProperty("buffer-options.encoding"),

104 encoding);

158

159 folding = new JComboBox(foldModes);

160 folding.setSelectedItem(buffer.getStringProperty("folding"));

161 addComponent(jEdit.getProperty("options.editing.folding"),

162 folding);

SelectionPanel.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 109 lines ✨ Summary

This Java code defines a custom panel for selecting input sources in an XQuery editor. It includes a text field to display the current source, a browse button to select a new source, and a label with a customizable property. The panel’s behavior is controlled by its actionPerformed method, which is declared abstract and must be implemented by subclasses.

93 };

94

95 public String getSourceFieldText() {

96 return sourceField.getText();

97 };

gnome-gettext.m4 (https://freespeech.svn.sourceforge.net/svnroot/freespeech) m4 · 337 lines ✨ Summary

This M4 code is a part of the GNU gettext package, which provides internationalization and localization support for software. It generates configuration files for building and installing gettext packages, including setting up locale directories, determining catalog formats, and creating lists of files to be processed by xgettext. The output is used to configure the build process for gettext packages.

40 dnl to use. If gettext or catgets are available (in this order) we

41 dnl use this. Else we have to fall back to GNU NLS library.

42 dnl catgets is only used if permitted by option --with-catgets.

43 nls_cv_header_intl=

44 nls_cv_header_libgt=

89

90 if test "$CATOBJEXT" = "NONE"; then

91 AC_MSG_CHECKING([whether catgets can be used])

92 AC_ARG_WITH(catgets,

93 [ --with-catgets use catgets functions if available],

94 nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)

95 AC_MSG_RESULT($nls_cv_use_catgets)

96

97 if test "$nls_cv_use_catgets" = "yes"; then

test_Tree_vs_jsonPathStore.html (http://enginey.googlecode.com/svn/trunk/) HTML · 111 lines ✨ Summary

This HTML code creates a Dijit Tree widget with a JSON store, allowing users to add and delete items from the tree. The tree has a label attribute that displays the item’s name, and an optional property that can be updated. Users can also add new items to the tree or update existing ones, with notifications sent to the tree when changes are made.

25 dojo.require("dijit.Menu");

26 dojo.require("dijit.form.Button");

27 dojo.require("dojo.parser"); // scan page for widgets and instantiate them

28

29 function deleteItem(){

JCheckBoxList.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 331 lines ✨ Summary

This Java code creates a custom table component, JCheckBoxList, which displays a list of items with checkboxes. Each item can be edited to toggle its checkbox state. The table model, CheckBoxListModel, manages the data and provides methods for editing cells. It uses two columns: one for the checkbox state and another for the item value.

122 } //}}}

123

124 //{{{ getSelectedValue() method

125 public Object getSelectedValue()

126 {

127 int row = getSelectedRow();

128 if(row == -1)

129 return null;

152 {

153 dummy = new DummyRenderer();

154 getSelectionModel().setSelectionMode(ListSelectionModel

155 .SINGLE_SELECTION);

156 setShowGrid(false);

lua.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 235 lines

4

5 <!-- TODO:

6 * Autoindent screws up, if { or ( gets typed after the indentNextLines trigger

7 -> This is very annoying, so I disabled the automatic indenting in this case!

8 -> It should be fixed if you set doubleBracketIndent to "true", but I keep it

xfs_filestream.h (http://omnia2droid.googlecode.com/svn/trunk/) C++ Header · 137 lines ✨ Summary

This C header file defines a set of functions and macros for managing filestream associations with allocation groups (AGs) on an XFS filesystem. It provides atomic counters to track active filestreams, ensuring that no invalid references exist in the cache. The code also includes prototypes for various filestream-related functions and constants for allocation selection flags.

60 *

61 * - The work queue scheduler fires and pulls a filestream directory cache

62 * element off the LRU end of the cache for deletion, then gets pre-empted.

63 * - A growfs operation grabs the m_peraglock in write mode, flushes all the

64 * remaining items from the cache and reallocates the mount point's per-ag

TextUtilities.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 714 lines ✨ Summary

This Java code provides various string manipulation and formatting functions, including:

  • String case detection (mixed, lower case, upper case, title case)
  • String conversion to title case
  • Line wrapping and formatting for text with a specified maximum line length
  • Leading whitespace trimming and calculation
  • Tokenization of strings into words

These functions can be used in various applications, such as text editing or formatting.

595 } //}}}

596

597 //{{{ getStringCase() method

598 public static final int MIXED = 0;

599 public static final int LOWER_CASE = 1;

607 * @since jEdit 4.0pre1

608 */

609 public static int getStringCase(String str)

610 {

611 if(str.length() == 0)

ListModelEditor.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 109 lines ✨ Summary

This Java code creates a GUI application that displays a table of items from a DefaultListModel. The user can interact with the table by pressing keys (Delete, Insert, Page Up, Page Down) to perform actions such as deleting rows, inserting new rows, and navigating between selected rows. If the user confirms changes, the updated list model is refreshed in the GUI application.

26 public void keyPressed(KeyEvent e)

27 {

28 int[] selRows = table.getSelectedRows();

29 if (selRows.length == 0)

30 {

33 int firstSelectedRow = selRows[0];

34 int key = e.getKeyCode();

35 ListSelectionModel selectionModel = table.getSelectionModel();

36 switch (key)

37 {

macro-tips.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 970 lines

39 tag = Macros.input(view, <quote>Enter name of tag:</quote>);

40 if( tag == null || tag.length() == 0) return;

41 text = textArea.getSelectedText();

42 if(text == null) text = <quote></quote>;

43 sb = new StringBuffer();

EditingOptionPane.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 422 lines ✨ Summary

This Java code is part of a text editor’s configuration management system. It defines a class that manages settings for different modes (e.g., programming languages) and buffers (e.g., editing windows). The class loads, saves, and updates these settings based on user input and file changes, ensuring consistency across the application.

137 {

138 jEdit.setProperty("buffer.defaultMode",

139 ((Mode)defaultMode.getSelectedItem()).getName());

140 jEdit.setProperty("buffer.undoCount",undoCount.getText());

141

181 current.firstlineGlob = firstlineGlob.getText();

182 current.noWordSep = noWordSep.getText();

183 current.folding = (String)folding.getSelectedItem();

184 current.collapseFolds = collapseFolds.getText();

185 current.wrap = (String)wrap.getSelectedItem();

186 current.maxLineLen = (String)maxLineLen.getSelectedItem();

187 current.tabSize = (String)tabSize.getSelectedItem();

188 current.indentSize = (String)indentSize.getSelectedItem();

189 current.noTabs = noTabs.isSelected();

190 current.deepIndent = deepIndent.isSelected();

DisplayOptions.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 96 lines ✨ Summary

This Java interface defines a set of options for customizing the display of JBrowse, a genome browser. It provides various boolean flags to control the visibility and formatting of different elements in the display, such as argument types, method names, icons, line numbers, and more. The interface also includes constants for defining different display styles.

43 // show arguments, pertains to constuctors and methods, if true, show the

44 // argument type, e.g. int or String

45 boolean getShowArguments();

46

47 // show argument name, pertains to constructors and methods, if true, show

48 // the declared name of the argument, e.g. the x in "int x".

49 boolean getShowArgumentNames();

50

51 // show qualified nested class or interface names

52 boolean getShowNestedName();

53

54 // not clear on this one -- appears to mean to show keywords like 'class' or

AntClassLoader.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 1173 lines ✨ Summary

This Java class is a custom class loader that loads classes from a specified path, including system classes and archives. It searches for classes in the specified path components, closes open archive files during cleanup, and provides methods to load classes from streams and resources. The class loader also handles security exceptions and IOExceptions when reading from streams or accessing resources.

668 private InputStream loadBaseResource(String name) {

669 if (parent == null) {

670 return getSystemResourceAsStream(name);

671 } else {

672 return parent.getResourceAsStream(name);

QuickNotepad.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 256 lines ✨ Summary

This Java code defines a QuickNotepad plugin for the jEdit text editor. It creates a floating window with a text area, toolbar, and tool panel, allowing users to edit files and save changes. The plugin also handles file loading, saving, and formatting, as well as responding to keyboard shortcuts like Esc to close the window.

62 this.floating = position.equals(DockableWindowManager.FLOATING);

63

64 if(jEdit.getSettingsDirectory() != null)

65 {

66 this.filename = jEdit.getProperty(

68 if(this.filename == null || this.filename.length() == 0)

69 {

70 this.filename = new String(jEdit.getSettingsDirectory()

71 + File.separator + "qn.txt");

72 jEdit.setProperty(

CustomAction.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 80 lines ✨ Summary

This Java class provides a custom action for Swing applications. It extends AbstractAction and allows setting tooltips, accelerators, mnemonics, icons, and action commands for actions. The class is abstract, meaning it cannot be instantiated directly, but can be subclassed to create specific action types. It also includes constants for common keyboard modifiers (CTRL, ALT, SHIFT, META).

63

64 public void setIcon(String file) {

65 //URL iconURL = ClassLoader.getSystemResource(file);

66 ImageIcon icon = new ImageIcon(file);

67 setIcon(icon);

qbezier.cpp (https://bitbucket.org/ultra_iter/qt-vtl.git) C++ · 702 lines

111 }

112

113 QBezier QBezier::getSubRange(qreal t0, qreal t1) const

114 {

115 QBezier result;

workspaceEditor.bsh (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 125 lines

41 this.returnVal = chooser.showOpenDialog( bsh.system.desktop.pane );

42 if (returnVal == JFileChooser.APPROVE_OPTION) {

43 this.file = chooser.getSelectedFile();

44 this.reader=new FileReader( file );

45 this.ca=new char [file.length()];

55 this.returnVal = chooser.showSaveDialog( bsh.system.desktop.pane );

56 if (returnVal == JFileChooser.APPROVE_OPTION) {

57 this.file = chooser.getSelectedFile();

58 this.writer=new FileWriter( file );

59 writer.write( textarea.getText().toCharArray() );

IOProgressMonitor.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 217 lines ✨ Summary

This Java code creates a GUI panel, IOProgressMonitor, that displays the progress of I/O operations on multiple threads. It uses a JProgressBar to show the progress and a button to abort the operation. The panel updates in real-time as new progress information is received from the underlying thread pool.

170

171 abort.setEnabled(true);

172 String status = thread.getStatus();

173 if(status == null)

174 status = "";

199 public void actionPerformed(ActionEvent evt)

200 {

201 if(evt.getSource() == abort)

202 {

203 int result = GUIUtilities.confirm(

RenderScrollbar.h (https://bitbucket.org/ultra_iter/qt-vtl.git) C Header · 99 lines

78 void updateScrollbarParts(bool destroy = false);

79

80 PassRefPtr<RenderStyle> getScrollbarPseudoStyle(ScrollbarPart, PseudoId);

81 void updateScrollbarPart(ScrollbarPart, bool destroy = false);

82

AbstractEntryTest.cs (http://google-gdata.googlecode.com/svn/trunk/) C# · 92 lines ✨ Summary

This C# code defines a test class AbstractEntryTest for testing the AbstractEntry class, which is part of the Google.GData.Client library. The test class contains a single test method ToggleCategoryTest that tests the functionality of toggling categories on an AbstractEntry instance.

21

22 /// <summary>

23 ///Gets or sets the test context which provides

24 ///information about and functionality for the current test run.

25 ///</summary>

AccordionContainer.js (http://enginey.googlecode.com/svn/trunk/) JavaScript · 266 lines ✨ Summary

This JavaScript code defines a custom widget called dijit.layout.AccordionPane, which is a container for multiple content panes that can be expanded and collapsed using a title. The widget provides functionality for selecting, focusing, and loading content in the pane. It also handles keyboard navigation and hover effects on the title.

189 // summary:

190 // AccordionPane is a ContentPane with a title that may contain another widget.

191 // Nested layout widgets, such as SplitContainer, are not supported at this time.

192 // example:

193 // | see dijit.layout.AccordionContainer

LoginDialog.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 334 lines ✨ Summary

This Java code creates a GUI application for managing FTP connections. It allows users to input host, user, and password information, as well as select private keys for secure connections. The application also includes features like auto-completion and file selection for private key management.

194 public void actionPerformed(ActionEvent evt)

195 {

196 Object source = evt.getSource();

197 if(source == ok)

198 ok();

316 if(returnVal == JFileChooser.APPROVE_OPTION) {

317 try{

318 privateKeyField.setText(chooser.getSelectedFile().getCanonicalPath());

319 } catch(java.io.IOException err) {

320 // Might be nice to pop this up

test.nrx (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 28 lines

14 say "scriptPath="scriptPath

15

16 setdir=jEdit.getSettingsDirectory() -- string with settings directory path (add \macros to get default script paths)

17

18 say "settings directory="setdir

PHPHyperlink.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 115 lines ✨ Summary

This Java class, PHPHyperlink, implements a hyperlink functionality for a text editor. It represents a hyperlink to a PHP file and provides methods to get its start and end offsets, lines, and tooltip. When clicked, it opens the corresponding PHP file in the text editor and moves the caret position to the line where the hyperlink is located.

54

55 @Override

56 public int getStartOffset()

57 {

58 return startOffset;

66

67 @Override

68 public int getStartLine()

69 {

70 return line;

98 Log.log(Log.MESSAGE, this, "Moving to line " + itemLine + ' ' + caretPosition);

99 /*

100 Selection[] s = getSelection();

101 if (s == null)

102 return;

SettingsReloader.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 95 lines ✨ Summary

This Java class, SettingsReloader, is a utility component that reloads macros and modes when necessary. It listens for VFSUpdate messages from the JEdit editor and checks if the updated path belongs to either the “macros” or “modes” directories. If it does, it calls methods to load or reload the corresponding settings.

47 {

48 String jEditHome = jEdit.getJEditHome();

49 String settingsDirectory = jEdit.getSettingsDirectory();

50

51 if(!MiscUtilities.isURL(path))

62

63 // XXX: does this really belong here?

64 SearchFileSet fileset = SearchAndReplace.getSearchFileSet();

65 if(fileset instanceof DirectoryListSet)

66 {

runme.java (https://swig.svn.sourceforge.net/svnroot/swig) Java · 89 lines ✨ Summary

The Java code demonstrates cross-language polymorphism using directors, showcasing how a C++ class (CEO) is used with a Java proxy class (Employee). It creates an instance of CEO and adds it to an EmployeeList, then accesses its methods through the list, illustrating how virtual method calls are resolved in both languages. The output shows the results of these method calls.

77

78 // Time to delete the EmployeeList, which will delete all the Employee*

79 // items it contains. The last item is our CEO, which gets destroyed as well.

80 list.delete();

81 System.out.println( "----------------------" );

DiffGlobalVirtualOverview.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 216 lines ✨ Summary

This Java code is part of a graphical user interface (GUI) for displaying two text areas side by side, with a cursor indicator in each area. The cursor is displayed as a vertical line and is positioned based on the current line number in each text area. The GUI uses pixel-perfect rendering to accurately position the cursor within the visible area of the window.

50 DisplayManager foldVisibilityManager1 = this.textArea1.getDisplayManager();

51

52 int virtualLineCount0 = foldVisibilityManager0.getScrollLineCount();

53 int virtualLineCount1 = foldVisibilityManager1.getScrollLineCount();

123 virtualLeftHeight = 0;

124 if (hunk.line0 >= lineCount0) {

125 virtualLeftOffset = foldVisibilityManager0.getScrollLineCount();

126 } else {

127 virtualLeftOffset = foldVisibilityManager0.physicalToVirtual(hunk.line0);

Service.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 205 lines ✨ Summary

This Java class represents an Info.plist Service, which is a configuration file used by macOS applications to provide services to other apps. It allows developers to define how their app responds to service requests, including port names, message invocation methods, menu item text, and data types. The class provides getter and setter methods for each field, allowing easy access and modification of the service’s properties.

167 }

168

169 public List getSendTypes() {

170 return (sendTypes == null) ? EMPTYLIST : Arrays.asList(sendTypes);

171 }

PropertyListWriter.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 443 lines ✨ Summary

This Java code generates an XML file that represents a macOS application’s bundle metadata, including its name, version, and various settings such as classpath, services, and properties. The output is a standard format required by Apple for distributing applications on the Mac App Store. It creates an XML document with key-value pairs representing the bundle’s configuration.

268

269 // Services, optional

270 List services = bundleProperties.getServices();

271 if (services.size() > 0)

272 writeServices(services,dict);

343 writeKeyStringPair("NSMessage",service.getMessage(),serviceDict);

344

345 List sendTypes = service.getSendTypes();

346 if (!sendTypes.isEmpty()) {

347 writeKey("NSSendTypes",serviceDict);

MsdnFsTemplateWizard.fsproj (https://hg01.codeplex.com/fsharpmvc3vsix) MSBuild · 106 lines

1 <?xml version="1.0" encoding="utf-8"?>

2 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

3 <PropertyGroup>

4 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>

34 <OtherFlags>--keyfile:"MsdnFsTemplate.snk"</OtherFlags>

35 </PropertyGroup>

36 <Import Project="$(MSBuildExtensionsPath32)\FSharp\1.0\Microsoft.FSharp.Targets" Condition="!Exists('$(MSBuildBinPath)\Microsoft.Build.Tasks.v4.0.dll')" />

37 <Import Project="$(MSBuildExtensionsPath32)\..\Microsoft F#\v4.0\Microsoft.FSharp.Targets" Condition=" Exists('$(MSBuildBinPath)\Microsoft.Build.Tasks.v4.0.dll')" />

38 <ItemGroup>

39 <Compile Include="NuGetService.fs" />

40 <Compile Include="ProjectService.fs" />

41 <Compile Include="TemplateWizard.fs" />

97 </ProjectReference>

98 </ItemGroup>

99 <!-- To modify your build process, add your task inside one of the targets below and uncomment it.

100 Other similar extension points exist, see Microsoft.Common.targets.

Activator.java (http://keywatch.googlecode.com/svn/trunk/) Java · 262 lines ✨ Summary

This Java code is an Activator class for an OSGi bundle, which sets up a web server using Jetty to host a web application. It provides access to services and implements various listener interfaces to handle bundle events and framework updates. The code initializes the servlet container, adds context, and starts the server when the bundle starts, stopping it when the bundle stops.

153 * @return an implementation of ServiceAccess-interface

154 */

155 public static IOSGIServiceAccess getServiceAccess()

156 {

157 return serviceAccess;

197 * @return the service or null if not found

198 */

199 public Object getService(String serviceName)

200 {

201 synchronized (this)

203 try

204 {

205 return bundleCtx.getService(bundleCtx.getServiceReference(serviceName));

206 }

207 catch (Exception ignored)

TagStack.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 298 lines ✨ Summary

This Java code defines a GUI component, TagStack, which displays a list of stack positions for a text editor. It allows users to navigate through these positions by clicking on them, and provides options to remove, pop, or clear the current position. The component also includes a popup menu with actions to perform on the selected position.

83 int index = list.locationToIndex(new Point(evt.getX(),

84 evt.getY()));

85 if(index > -1 && index != list.getSelectedIndex())

86 list.setSelectedIndex(index);

87

95 {

96 StackPosition pos = (StackPosition)

97 list.getSelectedValue();

98 if(pos != null)

99 pos.goTo(view);

116 }

117

118 goTo.setEnabled(list.getSelectedValue() != null);

119 remove.setEnabled(listModel.size() > 0);

120 pop.setEnabled(listModel.size() > 0);

SoftWrapsStorage.java (https://bitbucket.org/nbargnesi/idea.git) Java · 206 lines

48

49 @Nullable

50 public SoftWrap getSoftWrap(int offset) {

51 int i = getSoftWrapIndex(offset);

57 */

58 @NotNull

59 public List<SoftWrapImpl> getSoftWraps() {

60 return myWrapsView;

61 }

70 * to position at {@link #myWraps} collection where soft wrap for the given index should be inserted

71 */

72 public int getSoftWrapIndex(int offset) {

73 int start = 0;

74 int end = myWraps.size() - 1;

132 @Nullable

133 public SoftWrap storeOrReplace(SoftWrapImpl softWrap, boolean notifyListeners) {

134 int i = getSoftWrapIndex(softWrap.getStart());

135 if (i >= 0) {

136 return myWraps.set(i, softWrap);

InstallPanel.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 632 lines ✨ Summary

This Java code is part of a plugin manager for the JEdit text editor. It displays a table of plugins, allowing users to sort and install them. The code handles user interactions, such as clicking on column headers to sort the table, and installing selected plugins with optional dependencies. It also includes progress indicators and confirmation dialogs for installation operations.

58 table.setPreferredScrollableViewportSize(new Dimension(500,200));

59 table.setRequestFocusEnabled(false);

60 table.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION);

61 table.setDefaultRenderer(Object.class, new TextRenderer(

62 (DefaultTableCellRenderer)table.getDefaultRenderer(Object.class)));

399 setLineWrap(true);

400 setWrapStyleWord(true);

401 table.getSelectionModel().addListSelectionListener(this);

402 }

403

406 {

407 String text = "";

408 if (table.getSelectedRowCount() == 1)

409 {

410 Entry entry = pluginModel.getEntry(table.getSelectedRow());

plugin-implement.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 1232 lines

683 if(this.filename == null || this.filename.length() == 0)

684 {

685 this.filename = new String(jEdit.getSettingsDirectory()

686 + File.separator + "qn.txt");

687 jEdit.setProperty(QuickNotepadPlugin.OPTION_PREFIX

951 + "font", _font.getFamily());

952 jEdit.setProperty(QuickNotepadPlugin.OPTION_PREFIX

953 + "fontsize", String.valueOf(_font.getSize()));

954 jEdit.setProperty(QuickNotepadPlugin.OPTION_PREFIX

955 + "fontstyle", String.valueOf(_font.getStyle()));

BrowserColorsOptionPane.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 346 lines ✨ Summary

This Java code creates a GUI component for managing browser colors. It allows users to add, remove, and edit color settings for different file types. The component displays a table with two columns: one for glob patterns and another for corresponding colors. Users can select new colors from a palette or enter custom values. The changes are saved when the user clicks “Save”.

61 colorsTable.getTableHeader().setReorderingAllowed(false);

62 colorsTable.addMouseListener(new MouseHandler());

63 colorsTable.getSelectionModel().addListSelectionListener(

64 new SelectionHandler());

65 TableColumnModel tcm = colorsTable.getColumnModel();

108 private void updateEnabled()

109 {

110 int selectedRow = colorsTable.getSelectedRow();

111 remove.setEnabled(selectedRow != -1);

112 } //}}}

128 public void actionPerformed(ActionEvent evt)

129 {

130 Object source = evt.getSource();

131 if(source == add)

132 {

BSHParserTokenManager.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 2655 lines ✨ Summary

This Java code is part of a lexical analyzer for a programming language, specifically designed to parse strings with various characters such as quotes, parentheses, and special characters. It uses a finite state machine (FSM) approach to recognize patterns in input strings and generate output tokens. The FSM has multiple states and transitions based on the input character.

229 // indent --

230 // most lines get indented, but there are a few special cases:

231 // "else" gets put on the same line as the closing "}" for the "if",

232 // so don't want to indent. Similarly with "catch" and "finally".

233 // The "while" at the end of a "do" loop is marked as "^while" to

Selection.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 766 lines ✨ Summary

This Java class appears to be a part of an editor’s text selection functionality, managing the start and end positions of a selected text range within a buffer (likely a text document). It handles insertion, removal, and movement of content within the buffer, updating the selection boundaries accordingly. The class seems to be designed for efficient and accurate text selection management in an editor.

48 public abstract class Selection implements Cloneable

49 {

50 //{{{ getStart() method

51 /**

52 * Returns the start offset of this selection.

53 */

54 public int getStart()

55 {

56 return start;

66 } //}}}

67

68 //{{{ getStart() method

69 /**

70 * Returns the beginning of the portion of the selection

AntDomBasenameTask.java (https://bitbucket.org/nbargnesi/idea.git) Java · 44 lines

31

32 @Attribute("suffix")

33 public abstract GenericAttributeValue<String> getSuffix();

34

35 protected String calcPropertyValue(String propertyName) {

37 if (item != null) {

38 final String name = item.getName();

39 final String suffix = getSuffix().getStringValue();

40 return suffix != null && name.endsWith(suffix)? name.substring(0, name.length() - suffix.length()) : name;

41 }

WorkThread.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 244 lines ✨ Summary

This Java class, WorkThread, is a background thread that manages work requests for a WorkThreadPool. It provides methods to start and stop the thread, abort ongoing requests, and update its status. The thread continuously checks for new requests, executes them, and notifies the main thread when done. It also handles exceptions and aborts in case of errors or user request.

76 * @return the status label

77 */

78 public String getStatus()

79 {

80 return status;

XSearchHistoryTextField.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 569 lines ✨ Summary

This Java code defines a custom text field component, XSearchHistoryTextField, which displays a search history with down arrow buttons to navigate through previous searches. It uses a popup menu to display the search history and allows users to select individual searches. The component also includes a border with a down arrow icon to indicate the search history.

120 //{{{ setSelectAllOnFocus() method

121 /**

122 * Sets if all text should be selected when the field gets focus.

123 * @since jEdit 4.0pre3

124 */

128 } //}}}

129

130 //{{{ getSelectAllOnFocus() method

131 /**

132 * Returns if all text should be selected when the field gets focus.

276 if(evt.isShiftDown())

277 showPopupMenu(getText().substring(0,

278 getSelectionStart()),0,getHeight());

279 else

280 showPopupMenu("",0,getHeight());

FtpClient.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 1046 lines ✨ Summary

This Java code implements a basic FTP client and server framework. It provides methods for sending and receiving FTP commands, handling responses, and managing socket connections. The code includes classes for reading and writing data, as well as logging and debugging functionality. It appears to be a foundation for building a full-featured FTP application or library.

493 **/

494 public FtpWriter store(String path) throws IOException {

495 OutputStream ostr = getStoreStream(path);

496 if (ostr == null) return null;

497

501

502 public FtpOutputStream storeStream(String path) throws IOException {

503 OutputStream ostr = getStoreStream(path);

504 if (ostr == null) return null;

505

507 }

508

509 protected OutputStream getStoreStream(String path) throws IOException {

510 sendCommand("STOR " + path);

511 if (!getResponse().isPositivePreliminary()) {

TextToolsComments.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 492 lines ✨ Summary

This Java code provides functionality for managing range comments in a text editor, specifically in the JEdit application. It allows users to toggle and manage these comments, which can be used to highlight and annotate specific parts of text. The code includes methods for inserting, removing, and toggling comments, as well as checking if range comments are currently being used.

61 // get an array of all selected lines, or if there are no selections,

62 // just the line of the caret

63 int[] lines = textArea.getSelectedLines();

64 if(lines.length < 1)

65 {

175 if(!jEdit.getBooleanProperty("options.toggle-comments.keepSelected"))

176 {

177 Selection[] sArr = textArea.getSelection();

178 if(sArr.length > 0)

179 {

211 // get an array of all selections, if there are none, use the method

212 // that toggles comments around the caret

213 Selection[] selections = textArea.getSelection();

214 if(selections.length < 1)

215 {

KlearlooksTheme.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 91 lines ✨ Summary

This Java code defines a custom theme for a graphical user interface (GUI) application, specifically for a Swing-based UI. It provides a set of predefined colors and fonts used throughout the application, allowing developers to customize the appearance of their GUI components with a consistent look and feel. The theme is designed to resemble a clean and modern aesthetic.

78 public ColorUIResource getPrimary1() { return internalActiveBackground; }

79 public ColorUIResource getPrimary3() { return internalActiveBackground; }

80 public ColorUIResource getSecondary1() { return internalInactiveBackground; }

81 public ColorUIResource getSecondary3() { return internalInactiveBackground; }

85 public ColorUIResource getInternalButtonHighlight() { return internalButtonHighlight; }

86

87 public FontUIResource getStdFont() { return stdFont; }

88 public FontUIResource getStdBoldFont() { return stdBoldFont; }

89 public FontUIResource getSubTextFont() { return accelFont; }

90

91 }

CloseDialog.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 244 lines ✨ Summary

This Java code creates a dialog window for closing all buffers in an integrated development environment (IDE). It displays a list of open buffers, allows users to select and save or discard them, and provides options to cancel or close all buffers. The dialog updates its buttons based on the selected buffer index.

140 private void updateButtons()

141 {

142 int index = bufferList.getSelectedIndex();

143 save.getModel().setEnabled(index != -1);

144 discard.getModel().setEnabled(index != -1);

150 public void actionPerformed(ActionEvent evt)

151 {

152 Object source = evt.getSource();

153 if(source == selectAll)

154 {

160

161 bufferList.setSelectionInterval(0,

162 bufferModel.getSize() - 1);

163 }

164 finally

Delegate.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 573 lines ✨ Summary

This Java code is part of a text editor’s plugin system, responsible for managing various menus and actions. It defines classes for handling recent files, macros, and new views, as well as actions to show files in the Finder. The code provides a framework for plugins to interact with the text editor, allowing users to customize its behavior through menu options and keyboard shortcuts.

493 NSMenuItem item;

494 File file;

495 int max = model.getSize();

496

497 int length = numberOfItems();

Toggle_Header_Source.bsh (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 77 lines

34 String[] sourceExtensions = new String[]{"cpp", "c", "cxx" };

35

36 String getSourceFile(String baseName)

37 {

38 int numExt = sourceExtensions.length;

67 }

68 else if (extension.equals("h")) {

69 String sourceFile = getSourceFile(baseName);

70 jEdit.openFile(view, sourceFile);

71 }

BSHUnaryExpression.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 134 lines ✨ Summary

This Java code defines a class BSHUnaryExpression that extends SimpleNode. It handles unary expressions in a programming language, such as increment (++) and decrement (--). The class evaluates the expression by first determining if it’s a postfix operation (e.g., x++) or not. If it’s a postfix operation, it assigns the result to an LHS (left-hand side) before performing the operation.

54 LHS lhs = ((BSHPrimaryExpression)node).toLHS(

55 callstack, interpreter );

56 return lhsUnaryOperation( lhs, interpreter.getStrictJava() );

57 } else

58 return

XSLTPlugin.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 112 lines ✨ Summary

This Java code defines a plugin for the JEdit text editor, specifically an XSLT (Extensible Stylesheet Language Transformations) plugin. It sets up the necessary configuration and provides user-friendly error messages and dialog boxes for displaying information about the plugin’s functionality and usage.

97

98 static String getOldXalanJarMessage() {

99 String userPluginsDir = MiscUtilities.constructPath(jEdit.getSettingsDirectory(),"jars");

100 String userEndorsedDir = MiscUtilities.constructPath(userPluginsDir, "endorsed");

101

EnhancedDialog.html (https://jedit.svn.sourceforge.net/svnroot/jedit) HTML · 526 lines ✨ Summary

This HTML code is a documentation page for a Java class called EnhancedDialog. It displays information about the class, including its package, fields, constructors, and methods. The page includes navigation links to related classes and a summary of the class’s contents. The output appears to be generated by a tool or framework that creates documentation pages from Java source code.

341 </TR>

342 <TR BGCOLOR="white" CLASS="TableRowColor">

343 <TD><CODE>action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle</CODE></TD>

344 </TR>

345 </TABLE>

if_eql.h (http://omnia2droid.googlecode.com/svn/trunk/) C++ Header · 84 lines ✨ Summary

This C header file defines an equalizer load-balancer for serial network interfaces. It provides structures and constants to manage slave devices, including their priorities, queues, and master configurations. The code allows for enslave and emancipation operations, as well as getting and setting configuration information for slaves and masters.

28 #define EQL_EMANCIPATE (SIOCDEVPRIVATE + 1)

29

30 #define EQL_GETSLAVECFG (SIOCDEVPRIVATE + 2)

31 #define EQL_SETSLAVECFG (SIOCDEVPRIVATE + 3)

32

Buffer.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 2124 lines ✨ Summary

This Java code is part of a text editor’s implementation, specifically for managing buffers and their properties. It handles buffer creation, saving, loading, and updating, as well as handling autosave features and undo/redo functionality. The code updates various flags and properties to reflect changes in the buffer’s state, such as dirty status, file path, and mode.

237 public void run()

238 {

239 String newPath = getStringProperty(

240 BufferIORequest.NEW_PATH);

241 Segment seg = (Segment)getProperty(

803

804

805 //{{{ getSymlinkPath() method

806 /**

807 * If this file is a symbolic link, returns the link destination.

809 * @since jEdit 4.2pre1

810 */

811 public String getSymlinkPath()

812 {

813 return symlinkPath;

Make_Get_and_Set_Methods.bsh (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 298 lines

42 String getClassName()

43 {

44 int selectionStart = textArea.getSelectionStart();

45 int selectionEnd = textArea.getSelectionEnd();

157 void parseSelection()

158 {

159 int selectionStart = textArea.getSelectionStart();

160 int selectionEnd = textArea.getSelectionEnd();

272 actionPerformed(ActionEvent e)

273 {

274 if(e.getSource() == createButton)

275 {

276 createGetMethods = getCheckbox.isSelected();

ViewRegisters.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 184 lines ✨ Summary

This Java code creates a dialog window for viewing registers in an integrated development environment (IDE). It displays a list of register names and their corresponding values, with each value represented as a single character. The user can select a register name from the list to view its value in a text area. The dialog includes buttons for closing the window and canceling the operation.

65 }

66

67 if(registerModel.getSize() == 0)

68 registerModel.addElement(jEdit.getProperty("view-registers.none"));

69

157 public void actionPerformed(ActionEvent evt)

158 {

159 if(evt.getSource() == close)

160 cancel();

161 }

166 public void valueChanged(ListSelectionEvent evt)

167 {

168 Object value = registerList.getSelectedValue();

169 if(!(value instanceof Character))

170 return;

LoadLibraryWithNonConstantStringInspection.java (https://bitbucket.org/nbargnesi/idea.git) Java · 95 lines

19 import com.intellij.psi.util.ConstantExpressionUtil;

20 import com.intellij.psi.util.InheritanceUtil;

21 import com.siyeh.InspectionGadgetsBundle;

22 import com.siyeh.ig.BaseInspection;

23 import com.siyeh.ig.BaseInspectionVisitor;

31 @NotNull

32 public String getDisplayName() {

33 return InspectionGadgetsBundle.message(

34 "load.library.with.non.constant.string.display.name");

35 }

38 @NotNull

39 protected String buildErrorString(Object... infos) {

40 return InspectionGadgetsBundle.message(

41 "load.library.with.non.constant.string.problem.descriptor");

42 }

PublicStaticArrayFieldInspection.java (https://bitbucket.org/nbargnesi/idea.git) Java · 68 lines

20 import com.intellij.psi.PsiModifier;

21 import com.intellij.psi.PsiType;

22 import com.siyeh.InspectionGadgetsBundle;

23 import com.siyeh.ig.BaseInspection;

24 import com.siyeh.ig.BaseInspectionVisitor;

30 @NotNull

31 public String getDisplayName() {

32 return InspectionGadgetsBundle.message(

33 "public.static.array.field.display.name");

34 }

36 @NotNull

37 protected String buildErrorString(Object... infos) {

38 return InspectionGadgetsBundle.message(

39 "public.static.array.field.problem.descriptor");

40 }

ltmain.sh (https://freespeech.svn.sourceforge.net/svnroot/freespeech) Shell · 3976 lines ✨ Summary

This shell script is used to build and configure a library for use with the GNU Compiler Collection (GCC). It checks if the library is being built as a shared object, static library, or executable, and performs different actions accordingly. It also handles various flags and options passed to the compiler, such as version information, release information, and runtime path settings.

432 # Only build a PIC object if we are building libtool libraries.

433 if test "$build_libtool_libs" = yes; then

434 # Without this assignment, base_compile gets emptied.

435 fbsd_hideous_sh_bug=$base_compile

436

DockableWindowManager.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 1210 lines ✨ Summary

This Java code defines a dockable window manager for a text editor, allowing plugins to create and manage their own windows with customizable positions (top, left, bottom, right, or floating). The manager handles window creation, positioning, and removal, as well as plugin-specific functionality such as title setting and position registration.

934 public void layoutContainer(Container parent)

935 {

936 Dimension size = parent.getSize();

937

938 Dimension _topButtons = topButtons.getPreferredSize();

lpfc_sli.c (http://omnia2droid.googlecode.com/svn/trunk/) C · 11728 lines ✨ Summary

This C code is part of a Linux driver for a network interface card (NIC). It reads configuration data from the NIC and checks if certain ports are enabled or disabled. Specifically, it verifies the presence of a “PORT_STE” sub-TLV in the configuration region 23, which indicates whether the port is enabled or not. If the port is disabled, it sets a flag to indicate this.

194

195 /**

196 * lpfc_sli4_eq_get - Gets the next valid EQE from a EQ

197 * @q: The Event Queue to get the first valid EQE from

198 *

264

265 /**

266 * lpfc_sli4_cq_get - Gets the next valid CQE from a CQ

267 * @q: The Completion Queue to get the first valid CQE from

268 *

505 *

506 * This function is called with hbalock held. This function

507 * Gets a new driver sglq object from the sglq list. If the

508 * list is not empty then it is successful, it returns pointer to the newly

509 * allocated sglq object else it returns NULL.

TaskHighlight.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 247 lines ✨ Summary

This Java code defines a plugin for the jEdit text editor that highlights task items in a buffer by drawing a wavy line underneath them when highlighting is enabled. It uses a TextAreaExtension class to integrate with the jEdit interface and retrieves tasks from a buffer using a TaskListPlugin.

188 // Log.log(Log.DEBUG,this,"Calling underlineTask() for line "

189 // + String.valueOf(line) + "....");

190 int start = task.getStartOffset();

191 int end = task.getEndOffset();

192

OperatorNodes.PlusOpNode.html (https://code.google.com/p/plovr/) HTML · 428 lines ✨ Summary

This is a generated HTML document that displays information about a Java class, specifically com.google.template.soy.exprtree.OperatorNodes.PlusOpNode. It includes details such as the class hierarchy, methods, and fields, as well as links to related classes and documentation. The page also includes a footer with copyright information and links to Google’s privacy policy, terms of service, and about page.

202

203 <BR>

204 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets this node's kind (corresponding to this node's specific type).</TD>

205 </TR>

206 </TABLE>

321 <DL>

322 <DD><B>Description copied from interface: <CODE><A HREF="../../../../../com/google/template/soy/exprtree/ExprNode.html#getKind()">ExprNode</A></CODE></B></DD>

323 <DD>Gets this node's kind (corresponding to this node's specific type).

324 <P>

325 <DD><DL>

Chunk.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 589 lines ✨ Summary

This Java code is part of a text rendering engine, responsible for laying out and rendering text on a screen. It uses font substitution to find suitable fonts for characters that can’t be rendered by the default font. The code creates glyph vectors, which represent the visual representation of text, and calculates their widths based on the chosen font.

549 if (f != null)

550 {

551 f = f.deriveFont(dflt.getStyle(), dflt.getSize());

552

553 /*

SwingInstall.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 595 lines ✨ Summary

This Java code is part of a graphical user interface (GUI) for an installation program, likely for software distribution. It displays a progress bar and various panels to guide the user through the installation process, including selecting components, choosing directories, and displaying estimated disk usage. The GUI updates in real-time as the installation progresses, providing feedback to the user.

81 addWindowListener(new WindowHandler());

82

83 Dimension screen = getToolkit().getScreenSize();

84 pack();

85 setLocation((screen.width - getSize().width) / 2,

86 (screen.height - getSize().height) / 2);

87 setVisible(true);

88 }

208 public void actionPerformed(ActionEvent evt)

209 {

210 Object source = evt.getSource();

211 if(source == cancelButton)

212 System.exit(0);

275 public void layoutContainer(Container parent)

276 {

277 Dimension size = parent.getSize();

278

279 Dimension captionSize = caption.getPreferredSize();

example-cs.csproj (https://swig.svn.sourceforge.net/svnroot/swig) MSBuild scripts · 95 lines ✨ Summary

This is a Visual Studio project file (.csproj) that defines a C# console application named “runme”. It specifies the project’s settings, such as output type, configuration, and references to other files. The project has two configurations: Debug and Release, each with its own set of build actions and properties.

14 DefaultClientScript = "JScript"

15 DefaultHTMLPageLayout = "Grid"

16 DefaultTargetSchema = "IE50"

17 DelaySign = "false"

18 OutputType = "Exe"

CommonFileDialogTextBox.cs (https://vdm.svn.codeplex.com/svn) C# · 102 lines ✨ Summary

This C# code defines a class CommonFileDialogTextBox that represents a text box control in a Common File Dialog. It allows for customizing the dialog and synchronizes the managed properties with unmanaged native properties. The class provides methods to create instances, attach to a dialog object, and synchronize values between managed and native properties.

32

33 /// <summary>

34 /// Gets or sets a value for the text string contained in the CommonFileDialogTextBox.

35 /// </summary>

36 public override string Text

ebtables.h (http://photon-android.googlecode.com/svn/) C++ Header · 394 lines ✨ Summary

This C header file defines a framework for implementing network traffic filtering rules, specifically for Linux’s IP tables and eBPF (Extended Berkeley Packet Filter) systems. It provides data structures and functions for defining rules, matching packets against those rules, and registering/unregistering rule sets with the kernel. The code is designed to be used in conjunction with Linux’s networking stack.

26 #define EBT_CONTINUE -3

27 #define EBT_RETURN -4

28 #define NUM_STANDARD_TARGETS 4

29 /* ebtables target modules store the verdict inside an int. We can

30 * reclaim a part of this int for backwards compatible extensions.

237 unsigned int hook_mask);

238 void (*destroy)(const struct xt_target *target, void *targinfo);

239 unsigned int targetsize;

240 u_int8_t revision;

241 u_int8_t family;

256 unsigned int hook_mask);

257 void (*destroy)(const struct xt_target *target, void *targinfo);

258 unsigned int targetsize;

259 u_int8_t revision;

260 u_int8_t family;