Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ private IUnknown createControllerInitializationCallback(int previousAttempts) {
createInstance(previousAttempts + 1);
} else {
SWT.error(SWT.ERROR_UNSPECIFIED, null,
String.format(" Aborting Edge initialiation after %d retries with result %d", MAXIMUM_CREATION_RETRIES, result));
String.format(" Aborting Edge initialization after %d retries with result %d", MAXIMUM_CREATION_RETRIES, result));
}
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ public void create(Composite parent, int style) {
if (version == 0) {
if (IEVersion != 0) {
/*
* By default in Embedded IE the docuemntMode is Quirks(5)
* By default in Embedded IE the documentMode is Quirks(5)
* mode unless !DOCTYPE directives is defined in the HTML.
* As per MSDN IE8 and onwards, there is a way we could hint
* embedded IE to use current documentMode via appropriate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8986,7 +8986,7 @@ public void setKeyBinding(int key, int action) {
int keyInt = key & SWT.KEY_MASK;
char keyChar = (char)keyInt;
/**
* Bug 440535: Make sure the key getting mapped to letter is in defiened
* Bug 440535: Make sure the key getting mapped to letter is in defined
* character range and filter out incorrect int to char typecasting. For
* Example: SWT.KEYPAD_CR int gets wrongly type-cast to char letter 'p'
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public class DND {
/**
* Drag and Drop Operation: During a dragEnter event or a dragOperationChanged, if no modifier keys
* are pressed, the operation is set to DROP_DEFAULT. The application can choose what the default
* operation should be by setting a new value in the operation field. If no value is choosen, the
* operation should be by setting a new value in the operation field. If no value is chosen, the
* default operation for the platform will be selected (value is 1 << 4).
*
* @see DropTargetListener#dragEnter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ endif

ifndef NO_STRIP
# -s = Remove all symbol table and relocation information from the executable.
# i.e, more efficent code, but removes debug information. Should not be used if you want to debug.
# i.e, more efficient code, but removes debug information. Should not be used if you want to debug.
# https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html#Link-Options
# http://stackoverflow.com/questions/14175040/effects-of-removing-all-symbol-table-and-relocation-information-from-an-executab
AWT_LFLAGS := $(AWT_LFLAGS) -s
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
/**
* This class contains native functions for various libraries.
*
* Any dynamic functions must be manually linked to their corresponding library. See os_cutom.h #define FUNC_LIB_* LIB_*
* Any dynamic functions must be manually linked to their corresponding library. See os_custom.h #define FUNC_LIB_* LIB_*
*/
public class OS extends C {
/** OS Constants */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ typedef struct {
} SoupMessage;

// To avoid adding hard Gdk dependency and maintain dynamic nature of webkit calls, we re-define Gdk's struct here:
// Alternativley one could include at the top:
// Alternatively one could include at the top:
// #include <gdk/gdk.h>
// and add GTKCFLAGS and GTKLIBS to WEBKITCFLAGS and WEBKITLIBS respectively in make_linux.mak.
typedef struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ int fps_cached = 0;
}

void initFPs() {
// Example of a dynamic function initilization.
// Example of a dynamic function initialization.
// INIT_WEBKIT_FP(webkit_web_view_run_javascript_finish);

fps_cached = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@ private static class Webkit2AsyncToSync {
/** Object used to return data from callback to original call */
private static class Webkit2AsyncReturnObj {
boolean callbackFinished = false;
Object returnValue = null; // As note, if browser is disposed during excution, null is returned.
Object returnValue = null; // As note, if browser is disposed during execution, null is returned.

/** 0=no error. >0 means error. **/
int errorNum = 0;
Expand Down Expand Up @@ -2210,7 +2210,7 @@ long webkit_create_web_view (long web_view, long frame) {
parentBrowser = browser;
fireOpenWindowListeners.run();// Permit evaluate()/execute() to execute scripts in listener, but do not provide return value.
} catch (Exception e) {
throw e; // rethrow execption if thrown, but decrement counter first.
throw e; // rethrow exception if thrown, but decrement counter first.
} finally {
parentBrowser = null;
nonBlockingEvaluate--;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ public void moveTo(float x, float y) {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
/*
* Bug in Cairo. If cairo_move_to() is not called at the
* begining of a subpath, the first cairo_line_to() or
* beginning of a subpath, the first cairo_line_to() or
* cairo_curve_to() segment do not output anything. The fix
* is to detect that the app did not call cairo_move_to()
* before those calls and call it explicitly.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2521,7 +2521,7 @@ private boolean initUseNativeItemHeight() {

private static NSString getAwtRunLoopMode() {
// Special run loop mode mode used by AWT enters when it only wants related messages processed.
// The name of this mode is a defacto contract established by the JavaNativeFoundation (JNF) libary.
// The name of this mode is a defacto contract established by the JavaNativeFoundation (JNF) library.
// It could be accessed via OS.objc_lookUpClass("JNFRunLoop").
//
// However, in JDK 11.0.12 / 13.0.8 / 15.0.4 / 17 this broke:
Expand Down Expand Up @@ -3566,7 +3566,7 @@ public boolean post(Event event) {
}

/**
* Bug(?) in UCKeyTranslate: If event.keyCode doesn't map to a valid SWT constant and event.characer is 0 we still need to post an event.
* Bug(?) in UCKeyTranslate: If event.keyCode doesn't map to a valid SWT constant and event.character is 0 we still need to post an event.
* In Carbon, KeyTranslate eventually found a key that generated 0 but UCKeyTranslate never generates 0.
* When that happens, post an event from key 127, which does nothing.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public abstract class Widget {
/* The preferred size of a child has changed */
static final int LAYOUT_CHANGED = 1<<13;

/* A layout was requested in this widget hierachy */
/* A layout was requested in this widget hierarchy */
static final int LAYOUT_CHILD = 1<<14;

/* More global state flags */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ public static String byteToStringViaHeuristic(byte [] bytes) {
charDecoder.onUnmappableCharacter(CodingErrorAction.REPORT);
String text = charDecoder.decode(ByteBuffer.wrap(bytes)).toString();

// No exception thrown means that we have valid UTF-8 "bit string". However, valid UTF-8 bit string doesn't mean it's the corect decoding.
// No exception thrown means that we have valid UTF-8 "bit string". However, valid UTF-8 bit string doesn't mean it's the correct decoding.
// We have assert correctness via an educated guess
boolean probablyUTF8 = true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public static void init (GDBusMethod[] methods, String appName) {
0); // user_data_free_func

if (owner_id == 0) {
System.err.println("SWT GDBus: Failed to aquire bus name: " + serviceName);
System.err.println("SWT GDBus: Failed to acquire bus name: " + serviceName);
}
}

Expand Down Expand Up @@ -263,7 +263,7 @@ private static long onBusAcquired (long gDBusConnection, long const_gchar_name,

@SuppressWarnings("unused") // Callback Only called directly by JNI.
private static long onNameAcquired (long connection, long name, long user_data) {
// Currently not used, but can be used if acquring the gdbus name should trigger something to load.
// Currently not used, but can be used if acquiring the gdbus name should trigger something to load.
return 0;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2445,10 +2445,10 @@ private static FieldPosition getFieldPosition(Field field, AttributedCharacterIt
}

/**
* Check if the given {@link FieldPosition} are considdered "the same", this is
* Check if the given {@link FieldPosition} are considered "the same", this is
* when both are not <code>null</code> and reference the same
* {@link java.text.Format.Field} attribute, or both of them have no
* fieldattribute and have the same position
* field attribute and have the same position
*
* @param p1
* first position to compare
Expand Down Expand Up @@ -2489,7 +2489,7 @@ private static int getCalendarField(FieldPosition fieldPosition) {
/**
* Extracts the calendarfield transforming HOUR1 types to HOUR0
*
* @return the calendarfield coresponding to the {@link Field}
* @return the calendarfield corresponding to the {@link Field}
*/
private static int getCalendarField(Field field) {
if (Field.HOUR1.equals(field)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -442,10 +442,10 @@ public void setControl (Control control) {
if (control != null) {
//454940 ExpandBar DND fix.
//Reparenting on the GTK side.
//Proper hierachy on gtk side is required for DND to function properly.
//Proper hierarchy on gtk side is required for DND to function properly.
//As ExpandItem's child can be created before the ExpandItem, our only
//option is to reparent the child upon the setControl(..) call.
//This is simmilar to TabFolder.
//This is similar to TabFolder.
Control.gtk_widget_reparent (control, clientHandle);
}
parent.layoutItems();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ public void setOverwrite (boolean overwrite) {
* When the FileDialog is in URI mode it returns
* a URI (instead of a file name) for the following
* methods: open() and getFilterPath().
* The input argment for setFilterPath() should also
* The input argument for setFilterPath() should also
* be a URI.
*/
/*public*/ void setURIMode (boolean uriMode) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ Point computeSizeInPixels (int wHint, int hHint, boolean changed) {
* tall as the font height.
*
* NOTE: This work around does not fix the case when there are
* muliple lines of text.
* multiple lines of text.
*/
if (hHint == SWT.DEFAULT && labelHandle != 0) {
long layout = GTK.gtk_label_get_layout (labelHandle);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public abstract class Widget {
/* The preferred size of a child has changed */
static final int LAYOUT_CHANGED = 1<<18;

/* A layout was requested in this widget hierachy */
/* A layout was requested in this widget hierarchy */
static final int LAYOUT_CHILD = 1<<19;

/* More global state flags */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4610,7 +4610,7 @@ void setItemHeight (boolean fixScroll) {
if (itemHeight == -1) {
/*
* Feature in Windows. Windows has no API to restore the
* defualt item height for a table. The fix is to use
* default item height for a table. The fix is to use
* WM_SETFONT which recomputes and assigns the default item
* height.
*/
Expand Down
12 changes: 6 additions & 6 deletions docs/gtk-dev-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Upon completion of this document, hopefully you will know SWT-fu (as in kung-fu)

**Knowledge Pre-requisites**

* Solid Java knowledge: from class inheritence to multi-threading
* Solid Java knowledge: from class inheritance to multi-threading
* Some C experience: know thy pointers and make files
* GTK background highly recommended but can be learned
* Eclipse: knowing how to use Eclipse is quite essential. But you don't have to know about JFace/PlatformUI/RCP development internals
Expand Down Expand Up @@ -70,7 +70,7 @@ To develop SWT itself, being able to run SWT using the changes made to the sourc
**Add the SWT project to the build path**

In order to run snippets with the SWT source code, you will need to add the SWT project to the snippets' project build path. To do this:
* Right click the SWT snippets project in the Package Exlporer
* Right click the SWT snippets project in the Package Exporter
* Select "Properties"
* Select "Java Build Path" on the right hand side
* Select the "Projects" tab and click "Add..."
Expand Down Expand Up @@ -710,7 +710,7 @@ Eclipse has a plugin/perspective called "C/C++ Development Tools" or CDT. This i
**Getting started**

If you are using Fedora Eclipse you can install the CDT using dnf:
sudo dnf install eclispe-cdt
sudo dnf install eclipse-cdt

Alternatively if you are using upstream Eclipse, you can get it from the CDT update site: https://eclipse.org/cdt/downloads.php

Expand Down Expand Up @@ -743,7 +743,7 @@ You should try all of the above:

**Import GTK source code into Eclipse for browsing**

You can pull GTK sources and tie them into your Eclipse, so that you can navigate/read the source code easier. I then use the GTK source code as a way of reading GTK API. Compared to the web-documentation, reading the source code allows you to quickly jump to struct definitions and see examples of how/where functions are called via call-hierachy.
You can pull GTK sources and tie them into your Eclipse, so that you can navigate/read the source code easier. I then use the GTK source code as a way of reading GTK API. Compared to the web-documentation, reading the source code allows you to quickly jump to struct definitions and see examples of how/where functions are called via call-hierarchy.

You also see how certain objects 'relate' to each other, which you sometimes don't see in the web-documentation. You will often find that many functions are just wrappers around other functions. The most frequent use-case is when I write a GTK snippet, I can just jump to the function definition and read the documentation without plowing through the web-documents.

Expand Down Expand Up @@ -840,7 +840,7 @@ You should now be able to create your project.

Normally, if you create a GTK project you include the "usr/include/gtk+" paths. The problem with that is that "/usr/include/gtk" only contains header files, not the .c source code files from the GitHub repo. As such you won't be able to see the "guts" of GTK, which are often very useful and essential for when you're debugging SWT.

If you point your include to the GTK GitHub repo instead, then it might not compile unless you go thourgh the effort to compile the related libs (GLib/pixbuf etc…), which is quite a bit of effort. I.e, it's easier to use the GTK that is build in with your system for compilation.
If you point your include to the GTK GitHub repo instead, then it might not compile unless you go through the effort to compile the related libs (GLib/pixbuf etc…), which is quite a bit of effort. I.e, it's easier to use the GTK that is build in with your system for compilation.

The solution (which at least works for me) is to point the compiler to the system "usr/include" path (1*) and point the indexer to the GTK GitHub repository (2*). This way, when you are compiling, all will compile well and when you are writing code you easy quick-lookup to the GTK source code without having to compile all of this business.

Expand Down Expand Up @@ -958,7 +958,7 @@ SWT keeps its source code in one place, but during a project clean-up & rebuild,

As such, to make changes that have an impact on the code, you need to edit code in the src folder, but to debug you need to open the source code from the binary folder.

To make matters more complicated, during a rebuild, SWT tools will erase the whole binary folder and re-create it. This means that if you imported the folder as a project, the pointer to that folder is lost and the project 'dissapers' from Eclipse. However, there is a way to get around it. You can create a project in some other folder and add a link the SWT binary folder as a source. This way the project survives re-builds.
To make matters more complicated, during a rebuild, SWT tools will erase the whole binary folder and re-create it. This means that if you imported the folder as a project, the pointer to that folder is lost and the project 'disappears' from Eclipse. However, there is a way to get around it. You can create a project in some other folder and add a link the SWT binary folder as a source. This way the project survives re-builds.


Source code lies here: (e.g for changes to source code):
Expand Down
2 changes: 1 addition & 1 deletion examples/org.eclipse.swt.examples/plugin.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ plugin.SWTStandaloneExampleSet.name = SWT Standalone Examples Plugin

launchcategory.SWTStandaloneExamples.name = Standalone
launchcategory.SWTStandaloneExamples.description = \
A collection of Standard Widget Toolkit examples that run independant \
A collection of Standard Widget Toolkit examples that run independent \
of the Eclipse Platform.

launchitem.AddressBook.name = Address Book
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import org.eclipse.swt.graphics.Point;

/**
* The superclass for paint tools that contruct objects from individually
* The superclass for paint tools that construct objects from individually
* picked segments.
*/
public abstract class SegmentedPaintSession extends BasicPaintSession {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public void mouseDoubleClick(MouseEvent e) {}

@Override
public void completed(ProgressEvent event) {
System.out.println("compleated!! " + event.current);
System.out.println("completed!! " + event.current);
evalTest(browser, "");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public void widgetSelected(SelectionEvent e) {
});
shell.open();
System.out.println("INSTRUCTIONS: pressing the \"Create function\" button will create a function called theJavaFunction2.");
System.out.println("Pressing the \"Destroy function\" button will destory the function called theJavaFunction.");
System.out.println("Pressing the \"Destroy function\" button will destroy the function called theJavaFunction.");
System.out.println("To test that theJavaFunction2 was created, add the \"2\""
+ " at the end of theJavaFunction in the console and press enter.");
System.out.println("To test that theJavaFunction was deleted, remove the \"2\""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import org.eclipse.swt.widgets.Shell;

/*
* Title: Bug 548661 - [GTK] DND from SWT to embbedded AWT frame is broken. Verify that
* Title: Bug 548661 - [GTK] DND from SWT to embedded AWT frame is broken. Verify that
* How to run: launch snippet, drag the button "Drag Source" onto the button "Swing Target"
* Bug description: no drag events are reported in the console.
* Expected results: drag enter and drop/drag exit are reported according to user actions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public void keyPressed(KeyEvent e) {
}
});
// Hide the TableCursor when the user hits the "MOD1" or "MOD2" key.
// This alows the user to select multiple items in the widget.table.
// This allows the user to select multiple items in the widget.table.
cursor.addKeyListener(new KeyAdapter() {
@Override
public void keyPressed(KeyEvent e) {
Expand Down
Loading
Loading